πŸ“Š JAVA
Q. Which of the following package stores all the standard java classes?
  • (A) lang
  • (B) java
  • (C) java.util
  • (D) java.packages
πŸ’¬ Discuss
βœ… Correct Answer: (A) lang
πŸ“Š JAVA
Q. Which of these is a mechanism for naming and visibility control of a class and its content?
  • (A) Object
  • (B) Packages
  • (C) Interfaces
  • (D) None of the Mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (B) Packages
πŸ“Š JAVA
Q. Which of this access specifies can be used for a class so that its objects can be created by a different class in another package?
  • (A) Public
  • (B) Protected
  • (C) No Modifier
  • (D) All of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (A) Public
πŸ“Š JAVA
Q. Which of the following is correct way of importing an entire package ‘pkg’?
  • (A) import pkg.
  • (B) Import pkg.
  • (C) import pkg.*
  • (D) Import pkg.*
πŸ’¬ Discuss
βœ… Correct Answer: (C) import pkg.*
πŸ“Š JAVA
Q. Which of the following is incorrect statement about packages?
  • (A) Package defines a namespace in which classes are stored.
  • (B) A package can contain other package within it.
  • (C) Java uses file system directories to store packages.
  • (D) A package can be renamed without renaming the directory in which the classes are stored.
πŸ’¬ Discuss
βœ… Correct Answer: (D) A package can be renamed without renaming the directory in which the classes are stored.
πŸ“Š JAVA
Q. Which of these method of class String is used to extract a single character from a String object?
  • (A) CHARAT()
  • (B) chatat()
  • (C) charAt()
  • (D) ChatAt()
πŸ’¬ Discuss
βœ… Correct Answer: (C) charAt()
πŸ“Š JAVA
Q. Which of these method of class String is used to obtain length of String object?
  • (A) get()
  • (B) Sizeof()
  • (C) lengthof()
  • (D) length()
πŸ’¬ Discuss
βœ… Correct Answer: (D) length()
πŸ“Š JAVA
Q. Which of these keywords is not a part of exception handling?
  • (A) try
  • (B) finally
  • (C) thrown
  • (D) catch
πŸ’¬ Discuss
βœ… Correct Answer: (C) thrown
πŸ“Š JAVA
Q. The code within the ----------- block will always be executed whether or not an exception is thrown.
  • (A) try..catch
  • (B) finally
  • (C) throw
  • (D) throws
πŸ’¬ Discuss
βœ… Correct Answer: (B) finally
πŸ“Š JAVA
Q. Which of these keywords is used to manually throw an exception?
  • (A) try
  • (B) finally
  • (C) throw
  • (D) catch
πŸ’¬ Discuss
βœ… Correct Answer: (C) throw