Difference between this(), super()?
Answer Posted / a .k. singh
This keyword is pointing the same class object.and
super keyword is accessing the superc lass constructor
Is This Answer Correct ? | 10 Yes | 2 No |
Post New Answer View All Answers
Explain the difference between throw and throws in java?
What does a za z0 9 mean?
Which method you will use to create a new file to store some log data. Each time a new log entry is necessary, write string to the file in java ?
Is age discrete or continuous?
How will you invoke any external process in java?
What is string example?
What is the difference between notify and notifyall method?
Is string an object?
Which method cannot be overridden in java?
How many threads can java run?
Draw a UML class diagram for the code fragment given below: public class StringApplet extends Applet { private Label sampleString; private Button showTheString; private ButtonHandler bHandler; private FlowLayout layout; public StringApplet() { sampleString = new Label(" "); showTheString = new Button (" Show the String"); bHandler = new ButtonHandler(); layout = new FlowLayout(); showTheString.addActionListener(bHandler); setLayout(layout); add(sampleString); add(showTheString); } class ButtonHandler implements ActionListener { public void actionPerformed(ActionEvent e) { samplestring.setText("Good Morning"); } } } Note: The methods need not be indicated on the diagram.
When throws keyword is used?
Why is the main method static?
What is a method header?
What is the main use of generics in java?