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


Please Help Members By Posting Answers For Below Questions

Explain the difference between throw and throws in java?

541


What does a za z0 9 mean?

560


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 ?

627


Is age discrete or continuous?

679


How will you invoke any external process in java?

596






What is string example?

594


What is the difference between notify and notifyall method?

606


Is string an object?

646


Which method cannot be overridden in java?

590


How many threads can java run?

554


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.

1581


When throws keyword is used?

576


Why is the main method static?

593


What is a method header?

542


What is the main use of generics in java?

506