Core Java Interview Questions and Answers Pdf - 1
Question: 1
What is the difference between a Scrollbar and a Scrollpane?
A Scrollbar is a component, but not a container.
A Scrollpane is a container.
A Scrollpane handles its own events and performs its own scrolling.
Question: 2
How can we get all public methods of an object dynamically?
getMethods(): It return an array of method objects corresponding to the public methods of this class.
getFields(): It returns an array of Field objects corresponding to the public Fields (variables) of this class.
getConstructors: It returns an array of constructor objects corresponding to the public constructors of this class.
Question: 3
Which method will cause a Frame to be displayed?
.show()
.setVisible()
Question: 4
Explain the purpose of component’s requestFocus method?
The purpose of the requestFocnus() is to get the focus on the particular component and also on the window that contains the component.
Question: 5
Which method returns the preferred size of a component?
getPreferredSize()
Surveying and Levelling Agricultural Engineering MCQ Questions More
Electromagnetic Induction Questions & Answers Pdf More
A.C. Basics and Networks Quiz Questions & Answers Pdf More
Signals and Systems Quiz Questions and Answers Pdf More
Signals and Systems MCQ Questions and Answers Pdf More
100+ Reasoning Questions for Railway Group D Pdf More
7000+ Extractive Metallurgy MCQ Questions and Answers More
1000+ General English MCQs Questions and Answers More
Signals and Systems Quiz Questions and Answers Pdf More
International Quiz Questions and Answers More