Java Class Methods

Methods in Java

15 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Which of the following methods is not present in the AbstractButton class in java?

  1. getMargin()
  2. getText()
  3. getIconTextGap()
  4. getLabel()
  5. getMnemonic()
Question 2 Multiple Choice (Single Answer)

Which of the following methods is not present in the AbstractLayoutCache class in java?

  1. getRowCount()
  2. getRowHeight()
  3. invalidateSizes()
  4. isRootVisible()
  5. isRowHeightFixed()
Question 3 Multiple Choice (Single Answer)

Which of the following methods is not present in the TableModel Interface in java?

  1. getValueAt(int rowIndex, int colIndex)
  2. getColCount()
  3. setValueAt(Object aValue, int rowIndex, int colIndex)
  4. getRowCount()
  5. isCellEditable(int rowIndex, int colIndex)
Question 4 Multiple Choice (Single Answer)

Which of the following methods is not present in the AbstractDocument class in java?

  1. getLength()
  2. getStartPosition()
  3. getDocumentContent()
  4. writeUnlock()
  5. getEndPosition()
Question 5 Multiple Choice (Single Answer)

Which of the following methods is not present in the TextLayout class in java?

  1. isLeftToRight()
  2. isRightToLeft()
  3. getCharacterCount()
  4. isVertical()
  5. getBounds()
Question 6 Multiple Choice (Single Answer)

Which of the following methods is/are not present in the GridLayout class in java?

  1. layoutSize(Container parent)
  2. minLayoutSize(Container parent)
  3. setCols(int cols)
  4. getCols()
  5. All of the above
Question 7 Multiple Choice (Single Answer)

Which of the following methods is not present in the TableColumn class in java?

  1. sizeWidthToFit()
  2. getMaximumWidth()
  3. getIdentifier()
  4. getPreferredWidth()
  5. getResizable()
Question 8 Multiple Choice (Single Answer)

Which of the following methods is not present in the ImageInputStream Interface in java?

  1. isCached()
  2. getImage()
  3. readBoolean()
  4. getStreamPosition()
  5. flush()
Question 9 Multiple Choice (Single Answer)

Which of the following methods in HttpCookie class returns the maximum age of the cookie in seconds?

  1. getMaxAgeInSeconds()
  2. getMaxAge()
  3. getMaximumAge()
  4. getMaximumAgeInSeconds()
  5. getAge()
Question 10 Multiple Choice (Single Answer)

Which of the following methods is not present in the HttpCookie class in java?

  1. getPath()
  2. getValue()
  3. isHttpOnly()
  4. getMaximumAge()
  5. clone()
Question 11 Multiple Choice (Single Answer)

Which of the following methods is not present in the Imageview class in java?

  1. getImageURL()
  2. getNoImageIcon()
  3. getAltText()
  4. getLoadingImageIcon()
  5. getURL()
Question 12 Multiple Choice (Single Answer)

Which of the following methods is not present in the TextArea class in java?

  1. getCols()
  2. getMinimumSize()
  3. getRows()
  4. append(String str)
  5. insert(String str, int pos)
Question 13 Multiple Choice (Single Answer)

Which of the following methods is present in the GroupLayout class in java?

  1. setVGap(int gap)
  2. setVGroup(GroupLayout.Group group)
  3. getLayoutAlignmentY(Container parent)
  4. minLayoutSize(Container parent)
  5. layoutSize(Container parent)
Question 14 Multiple Choice (Single Answer)

Which of the following methods in TextField class fetches the minimum dimensions for this text field?

  1. minimumSize()
  2. minSize()
  3. getMinSize()
  4. getMinimumSize()
  5. getMinDimensions()
Question 15 Multiple Choice (Single Answer)

Which of the following methods in AbstractButton class returns the margin between the button border and the label?

  1. getTextBorderGap()
  2. getBorderLabelMargin()
  3. getMargin()
  4. getTextBorderMargin()
  5. getIconTextGap()