Java Assessment
Java Assessment
Core Java
Email *
s14anjana@gmail.com
0 of 0 points
Name *
sanjana Reddy
char
String
byte
short
Yes
No
Yes we can
No we can't
none
what is the output for the given code * 1/1
CTE
205
206
207
10 of 12 points
Heap Area
Method Area
Stack Area
Which is the correct syntax for declaring static data member? * 1/1
.class file
.java file
.javac file
.txt
In which area of memory, the system stores parameters and local *1/1
variables whenever a method is invoked?
Heap
Storage Area
Stack
Array
Create a constructor
Create a Object
None of these
How many maximum numbers of objects can be created from a single *1/1
Class in Java?
a. 32
b. 64
c. 128
Yes
No
JVM
JDK
JIT
JRE
d. None of these
1 of 3 points
12. The default values for float, boolean and string. * 1/1
a. 0.0f, true, 0
d. 0, true, bull
14. What is the Output? * 0/1
a. 50.2
b. 10.8
c. 10.8f
d. 50.2f
11. Where will the memory be allocated for static variables * 0/1
Section 1 25 of 39 points
Trace the code * 1/1
true
res : True
res : false
res : true
CTE
Trace the code: * 1/1
Be safe
Invalid
Yes
No
Trace the code: * 1/1
s2 is greater
no output
s1 is greater
What is the minimum iteration of while loop and do while loop * 1/1
0 and 1
1 and 0
1 and 1
0 and 0
Break statement can be used only inside * 1/1
loops
switch
localVariable
Class A
{
public static void main (String []args)
{
int i=1;
while (i!=5)
{
if(i%2==0) continue;
System.out.println(i);
i++;
}
}
}
1,3,5
2,4
CTE
5
Choose the correct syntax of the DO WHILE loop in Java below * 1/1
Option 1 Option 2
Option 3 none
What is the output? * 1/1
13579
2 4 6 8 10
2468
<methodName>
<methodName>(actual args)
<methodName>(formal args)
10 16
10 15
9 16
9 15
What's the output of given code..? * 0/1
Class A
{
public static void main (String []args)
{
System.out.println(true);
}
}
true
false
CTE
None
private
final
protected
default
Trace code * 1/1
CTE
1
Trace the code: * 0/1
WORLD
hello
Trace the code: * 1/1
Distinction Failed
First Class
Distinction
Just pass
Every loop in Java has a condition that should be __ in order to proceed *1/1
for execution.
true
false
What is the output of the following code snippet? * 0/1
Opp
CTE
4
Trace the code * 1/1
false
true
Error
CTE
What is the output of the Java program with IF-ELSE statements? * 0/1
GO
STOP
What are the keywords used to implement a SWITCH case in Java *1/1
language?
switch, case
default
break
both a and b
In for loop if the condition is not provided, by default what it will take * 1/1
true
false
Null
If it is not called
Only if it is called
Both a and b
10
A
Trace the code * 0/1
Infinite loop
CTE
true
false
CTE
None
What is the output for the following code * 0/1
11
12
13
10
Trace the code: * 1/1
123
1234
CTE
while(true);
for(;true;);
do{ }while(true);
All
Is main method is user defined method or pre defined method * 0/1
A. NO
B. option A
I don't know...
Which type of loop is guaranteed to have the body execute at least once? * 1/1
while loop
for loop
do while loop
none
Trace the code: * 1/1
no output
JAVA
630
63
30
if else
switch
None
This content is neither created nor endorsed by Google. Report Abuse - Terms of Service - Privacy Policy
Forms