wHAT IS DEFAULT SPECIFIER IN JAVA
wHAT IS DEFAULT CONSTRUCTOR IN JAVA
wHAT IS DEFAULT METHOD IN JAVA
Answer Posted / safikur
default specifier in java is DEFAULT
which can only be visible within the same package.
You can't access any default member of a class directly
from outside the package , you can access those member
through another method of that class.
default CONSTRUCTOR in java is the constructor which has
the same name of the class and has no arguments. if you
define at least one constructor in a class JVM will not put
the default constructor in the class like..
public className(){super();}
if there is no constructor in the class JVM will put the
default constructor in the class like..
public className(){super();}
since its not visible. but implicitly defined by compiler..
there is no concept of DEFAULT method in java spec.
| Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
What happens when a thrown exception is not handled?
What is command line used for?
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.
Can list be final in java?
Describe method overriding
What is pass by value?
How will you calculate the depth of a binary tree if the tree contains 15 nodes?
What is foreach loop in java?
What is singleton class in ruby?
What is overloading and overriding in java?
Explain the significance of class loaders in bootstrap?
What is difference between null and void?
What is the concatenation operator in java?
Is java se open source?
What is a generic data type?