Computer Knowledge

Java Core Classes and Threads

1,473 Questions

Java core classes and threads form the foundation of object oriented programming and are crucial for IT officer and programming exams. This includes concepts like string mutability, collections, and multithreading. Solve these questions to test your practical coding and theoretical knowledge.

String and StringBuffer classesThread execution methodsJava collections frameworkCharacter streams input outputVariable serialization rules

Java Core Classes and Threads Questions

Multiple choice
  1. createLoweredBevelBorder()

  2. createRaisedBevelBorder()

  3. createBevelBorder(int, Color, Color)

  4. createMatteBorder(int, int, int, int, Color)

  5. createFilledBorder()

Reveal answer Fill a bubble to check yourself
E Correct answer
Explanation

This is the correct choice because there is no method named createFiledBorder() in java. So, this answer is correct.

Multiple choice
  1. getPercentComplete()

  2. setBorderPainted(boolean)

  3. setPaintedBorder(boolean)

  4. isStringPainted(boolean)

  5. setMinimum(int)

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

This the correct choice because there is no method name setPaintedBorder() in JProgressBar class. The correct method is setBorderPainted which Set the progress bar with a border. So, this answer is true.

Multiple choice
  1. replace(char , char)

  2. replaceAll(String , String)

  3. append(String)

  4. Both 1 and 2

  5. All of the above

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

This is the correct answer. Because the String class objects are immutable i.e once the object of the String class is created its contents cannot be changed. So, we cannot append new characters or string in the old string. So, this is the correct answer.