Java Programming Fundamentals
Covers core Java concepts including threading, string manipulation, event handling, I/O streams, and basic application programming.
Questions
Which of the following methods of ThreadClass in Java determines if a thread is still running or not?
- getName
- isAlive
- join
- none of these
Which of the following methods in interthread communication in Java wakes up all the threads that called wait() on the same object?
- wait()
- notify()
- notifyAll()
- none of these
Which of the following interfaces in Java beans consists of methods that are used to initialise beans, which are also applets?
- BeanInfo
- Customizer
- AppletInitializer
- None of these
Which of the following methods in string class of Java is used to extract more than one character at a time?
- charAt()
- toCharArray()
- getChars()
- none of these
Which of the following methods of StringBuffer class is used to pre-allocate room for a certain number of characters?
- ensureCapacity()
- capacity()
- length()
- none of these
Which of the following methods of Thread class is used to resume execution of all threads waiting on the invoking object?
- notify()
- notifyAll()
- hashCode()
- none of these
The textChanged() method in Java belongs to ____________ interface.
- WindowListener
- TextListener
- MouseMotionListener
- None of these
Which of the following event listener interfaces in Java defines one method to receive adjustment events?
- ActionListener
- ItemListener
- AdjustmentListener
- TextListener
Which of the following events is generated when an user enters a character?
- Button
- Choice
- Text component
- None of these
Which of the following attributes is required that gives the name of the file containing the applets compiled .class file in Java?
- CODEBASE
- CODE
- ALT
- None of these
Which of the following event classes is generated when a component gains or loses input focus?
- FocusEvent class
- ContainerEvent class
- ComponentEvent class
- None of these
Which of the following event classes is generated when input is received from the keyboard?
- KeyEvent
- MouseEvent
- TextEvent
- WindowEvent
Which of the following stream classes in Java is an output stream that contains methods for writing the Java standard data types?
- DataInputStream
- DataOutputStream
- PushbackInputStream
- None of these
Which of the following character options is used in a JAR file to create a new archive?
- 'C'
- 'c'
- 'u'
- 'v'
Which of the following stream classes in Java is an input stream that reads data from a file?
- FileReader
- FileWriter
- PrintWriter
- None of these