Please login

Prime

Prepinsta Prime

Video courses for company/skill based Preparation

(Check all courses)
Get Prime Video
Prime

Prepinsta Prime

Purchase mock tests for company/skill building

(Check all mocks)
Get Prime mock

Quiz 1

Question 1

Time: 00:00:00
In which package the String class is encapsulated in java?

java.util

java.util

java.lang

java.lang

Java.io

Java.io

None of the mentioned

None of the mentioned

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

Please login to submit your explanation

Start

Question 2

Time: 00:00:00
String is immutable in java.

True

True

False

False

Can’t say

Can’t say

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 3

Time: 00:00:00
Which method in java is used to get the string representation of an object ?

toString()

toString()

hashcode()

hashcode()

Both a and b

Both a and b

None of the mentioned

None of the mentioned

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

Please login to submit your explanation

Start

Question 4

Time: 00:00:00
In which of the following classes toString() method is overridden?

String

String

StringBuffer

StringBuffer

StringBuilder

StringBuilder

All of these

All of these

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

Please login to submit your explanation

Start

Question 5

Time: 00:00:00
Object class toString() method internally calls which of the following methods?

hashCode()

hashCode()

equals()

equals()

getName()

getName()

getClass()

getClass()

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

Please login to submit your explanation

Start

Question 6

Time: 00:00:00
Object class equals() method meant for

content compression

content compression

reference compression

reference compression

Both A and B

Both A and B

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 7

Time: 00:00:00
Which of these methods of String class is used to obtain character at specified index?

char()

char()

Charat()

Charat()

charat()

charat()

charAt()

charAt()

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

Please login to submit your explanation

Start

Question 8

Time: 00:00:00
In java, which method is used to find the length of the string?

size()

size()

length()

length()

len()

len()

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 9

Time: 00:00:00
 How is Date stored in database?

java.sql.Date

java.sql.Date

java.util.Date

java.util.Date

java.sql.DateTime

java.sql.DateTime

java.util.DateTime

java.util.DateTime

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

Please login to submit your explanation

Start

Question 10

Time: 00:00:00
How to format date from one form to another?

SimpleDateFormat

SimpleDateFormat

DateFormat

DateFormat

SimpleFormat

SimpleFormat

DateConverter

DateConverter

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!"]

Completed

0/0

Accuracy

0%

Prime

PrepInsta Prime Video

Complete video course for GenC Elevate

for Elevate
Get Prime Video

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%