
23CSR306_Unit I
Authored by ARTHI C1514
Information Technology (IT)
University
Used 3+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a valid main method signature in Java?
public static int main(String[] args)
public static void main(String args[])
public void static main(String args[])
public static void main()
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens if you declare main as private static void main(String[] args)?
Compilation error
Runtime error
Program executes normally
JVM throws SecurityException
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the result of the expression: 10 + 20 + "30"?
"3030"
"102030"
"30"
Error
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of:
int a = 5;
System.out.println(a++ + ++a);
11
12
13
14
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is not a primitive data type in Java?
boolean
int
String
double
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the result of the following code?
byte b = 50;
b = b * 2;
System.out.println(b);
100
Compilation error
Runtime error
0
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output?
int x = 5;
int y = ++x * 2;
System.out.println(y);
10
12
11
13
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Microsoft
or continue with
%20(1).png)
Apple
Others
Already have an account?