Advanced Java (NCO)

Advanced Java (NCO)

15 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

The _______________ method of DynamicBillboard.java class is used to create and initialise the next billboard object that the applet will use.

  1. finishInit()
  2. parseBillData()
  3. start()
  4. stop()
  5. init()
Question 2 Multiple Choice (Single Answer)

The _____________ method of FontMetrics class is used to return the width of the widest character in java applet.

  1. getDescent()
  2. getMaxAdvance()
  3. getLeading()
  4. getMaxAscent()
  5. stringWidth()
Question 3 Multiple Choice (Single Answer)

The method used to modify the work ______ pixels array for the next cell in ColumnTransition. java class is

  1. destroy()
  2. setupFillPixels()
  3. Smash()
  4. Tear()
  5. nextCell()
Question 4 Multiple Choice (Single Answer)

The ________________ control in AWT class is an object of type label that contains a string which it displays.

  1. Push button
  2. Label
  3. CheckBox
  4. Choice list
  5. List
Question 5 Multiple Choice (Single Answer)

The ______________ part of AWT class uses five component: North, South, East, West and Center.

  1. Button
  2. Canvas
  3. BorderLayout
  4. CheckBox
  5. Choice
Question 6 Multiple Choice (Single Answer)

The ___________ character stream class in Java is an abstract class that describes character stream input in Java.

  1. StringReader
  2. Reader
  3. RandomAccessFile
  4. FileInputStream
  5. FileReader
Question 7 Multiple Choice (Single Answer)

To convert all the characters in a input string from lowercase to uppercase, ____________ method is used in Java.

  1. toUpperCase()
  2. setLength()
  3. toLowerCase()
  4. ensureCapacity()
  5. capacity()
Question 8 Multiple Choice (Single Answer)

The ______________ stream class in Java is supposed to be used to write a byte array into the memory.

  1. ByteArrayInputStream
  2. BufferedInputStream
  3. DataInputStream
  4. ByteArrayOutputStream
  5. FileInputStream
Question 9 Multiple Choice (Single Answer)

The ____________ method in Java is used to return a string that contains the decimal equivalent of the invoking object.

  1. byteValue()
  2. toString()
  3. hashCode()
  4. compareTo()
  5. valueOf()
Question 10 Multiple Choice (Single Answer)

The ___________ method of Runtime class is used to initiate calls to the finalize() method of unused but not yet recycled objects.

  1. totalMemory()
  2. load()
  3. runFinalization()
  4. gc()
  5. freeMemory()
Question 11 Multiple Choice (Single Answer)

The ____________ method of mouse movement applet class is used to unselect all the menu items in the applet.

  1. mouseExited()
  2. mouseDragged()
  3. mouseReleased()
  4. mouseMoved()
  5. DataInputStream
Question 12 Multiple Choice (Single Answer)

The ____________ method of font class is used to return the style values of the invoking font.

  1. getSize()
  2. getName()
  3. getStyle()
  4. getFamily()
  5. isBold()
Question 13 Multiple Choice (Single Answer)

The ____________ method of Process class is used to return an output stream that writes output to the 'in' input stream process.

  1. getErrorStream()
  2. getOutputStream()
  3. getInputStream()
  4. destroy()
  5. exitValue()
Question 14 Multiple Choice (Single Answer)

The _________ method of Map class is used to return 'true' value if the invoking map contains 'k' as a key, which is passed as argument with the method.

  1. containsKey()
  2. clear()
  3. runFinalization()
  4. gc()
  5. freeMemory()
Question 15 Multiple Choice (Single Answer)

The ___________ exception class is supposed to be used in Java if access to a class is denied.

  1. InterruptedException
  2. ClassNotFoundException
  3. IllegalAccessException
  4. InstantiationException
  5. SecurityException