Computer Knowledge

Java Core Classes and Threads

1,935 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. Java.net.BindException

  2. Java.net.BusyPortException

  3. Java.net.UnknownHostException

  4. Java.net.PortNotFoundException

  5. Java.net.PortBusyException

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

In Java network programming, the server creates a server socket on which it listens to the connections of the client. The syntax to create a server socket is: ServerSocket objectname = new ServerSocket(port);

Multiple choice
  1. setLocation(int, int)

  2. setVisible(Boolean)

  3. setSize(int, int)

  4. setDefaultCloseOperation(int)

  5. Pack()

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

This is the correct answer.