Note 1

Take Note:

Take a note while surfing.





Note With Ink

Give your Note a Colorful Tag.




Easy to Access

Stay on same information and in Sync wherever you are.

Note 2

Take Note:

Organize your information,It may take Shape.





Think With Ink

Differ your Content by Color.




Easy to Access

Easy to pull up your content from anywhere anytime.

Note 3

Take Note:

Don't Let information to miss,Because it take shape





Note With Ink

Simple an Easy Way to take a note.




Easy to Access

Get the same in next visit.

JAVA Programming :: Objects and Classes

Home > JAVA Programming > Objects and Classes > General Questions

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option D

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

13. What is the output for the below code ?

public class Test {
public static void main(String... args) {
int a =5 , b=6, c =7;
System.out.println("Value is "+ b +;
System.out.println(a + b +;
System.out.println("String "+(b+);
}
}

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option A

Explanation:

If the left hand operand is not a String then + operator treat as plus BUT if left hand operand is a String then + perform String concatenation.

Workspace

Tags:

No Tags on this question yet!

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option D

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

15. Select the one correct answer. Which method defined in Integer class can be used to convert an Integer object to primitive int type

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option B

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

16. Is the following statement true or false, As the toString method is defined in the Object class, System.out.println can be used to print any object.

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

17. What is the output for the below code ?

1. public class Test {
2. public static void main(String... args) {
3. Integer i = 34;
4. String str = (i<2?"jan":(i<56)?"feb":"march";
5. System.out.println(str);
6. }
7. }

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option A

Explanation:

This is nested conditional with unbox. (i<2 is false goto (i<56), (i<56) is true so result is "feb".

Workspace

Tags:

No Tags on this question yet!

18. Name the keyword that makes a variable belong to a class, rather than being defined for each instance of the class. Select the one correct answer.

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

19. What is the return type of method round(double d) defined in Math class.

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option D

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!