WeCP Java Quiz 1

Question 1

Time: 00:00:00
Which of the following is not a Java feature?

Dynamic

Dynamic

Object oriented

Object oriented

Use of pointers

Use of pointers

Inheritance

Inheritance

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 2

Time: 00:00:00
What will be the output of the following code-:

 

public class Main

{

public static void main(String[] args) {

System.out.print("Hello");

System.out.println(" I am a");

System.out.print("PrepSter");

}

}

 

Options

 

 

Hello I am a PrepSter

Hello I am a PrepSter

Hello I am a PrepSter

Hello I am a PrepSter

Hello I am a PrepSter

Hello I am a PrepSter

Hello I am a PrepSter

Hello I am a PrepSter

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 3

Time: 00:00:00
Which of the following is used to find and fix bugs in the Java programs ?

JVM

JVM

JDK

JDK

JDB

JDB

JRE

JRE

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 4

Time: 00:00:00
What will be the output of the following code-:

public class Main

{

public static void main(String[] args) {

int x=3, y=5, z=10;

int sum=0;

sum = ++x - y++ + z-- + ++x;

System.out.print(sum);

}

}

13

13

14

14

15

15

16

16

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 5

Time: 00:00:00
What is the use of the JavaDoc tool in java ?

It is used for writing comments in codes

It is used for writing comments in codes

It is used for reading text files into codes

It is used for reading text files into codes

It is a tool for generating API documentation in HTML format from doc comments in source code

It is a tool for generating API documentation in HTML format from doc comments in source code

None of the above

None of the above

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 6

Time: 00:00:00
Which of these is not a type of memory area allocated by JVM ?

Stack

Stack

Heap

Heap

Register

Register

Class area

Class area

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 7

Time: 00:00:00
Which of the following constructor is not present in java ?

Copy Constructor

Copy Constructor

Parameterized Constructor

Parameterized Constructor

Non-Parameterized constructor

Non-Parameterized constructor

Default constructor

Default constructor

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 8

Time: 00:00:00
How many total keywords are there in Java ?

48

48

52

52

50

50

49

49

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 9

Time: 00:00:00
Which of the following statements is incorrect in Java ?

int a = 10;

int a = 10;

int $per = 10;

int $per = 10;

int % = 10.0%;

int % = 10.0%;

double _per = 10f;

double _per = 10f;

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 10

Time: 00:00:00
What is the output of the following code ?

 

class Main

{

public static void main(String args[])

{

String s1 = new String("PrepInsta");

String s2 = new String("prepinsta");

if (s1 == s2)

System.out.println("Equal");

else

System.out.println("Not equal");

}

}

Equal

Equal

Not Equal

Not Equal

Runtime Error

Runtime Error

Compile Time Error

Compile Time Error

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

["0","40","60","80","100"]
["Need more practice!","Keep trying!","Not bad!","Good work!","Perfect!"]

Personalized Analytics only Availble for Logged in users

Analytics below shows your performance in various Mocks on PrepInsta

Your average Analytics for this Quiz

Rank

-

Percentile

0%

Completed

0/0

Accuracy

0%

Comments