61⟩ When we create a class, we are creating a new data typeA) TrueB) False
well, it isn't /quite/ the same as a struct. A class can contain methods as well as state, remember...
“Java Classes frequently Asked Questions in various Java Classes related job Interviews by interviewer. Get preparation of Java Classes job interview questions”
well, it isn't /quite/ the same as a struct. A class can contain methods as well as state, remember...
By making constructor as 'private', we can make a final class.
D)None of the above.This is because the class is a valid keyword and not Class.This might catch inexperienced programmers who are taught the first letter of the class by convention is capital.
It always allocates memory...
it is True the avriable receiving the value must be compatible.
true.....class declared with static called static inner class....with out static called non static inner class..
Ans is constructer.
B'coz When a object is created following things are happen:
1) Memory gets allocated to the object
2) Constructer gets called.
3) In constructer the object gets initialize.
i think this will be sufficient to clear the topic..
I think it is true. Because, we use initalize some variables which are not dynamic.
For eg: int i = 10;
whan we create an object so code are classname obj=new classname();classname is name of the classobj is objectnew is create new instances of class classnameso that ans is true...........what u say
Interface i = new Interface(){/* Code}The above statement creates an instance of a class which implements the Interface "Interface". As name of class is not specified hence it is anonymous.
Please share your answers.
When we override a method in the child class, that method sould not be a private in parent class, but that method should be public or protected or default, those methods should have the same signature.
But we can overload the method within the same class or in the child class but they have some difference in having no of arguments or type of arguments. if we overload the method within the class we can use any access specifier, if we overload in child class dont use private.
public interface Enumeration . An object that implements the Enumeration interface generates a series of elements, one at a time. Successive calls to the nextElement method return successive elements of the series.
You can not call 2 interface in interface but you can extend interfaces in your interface.Example :
Interface I1{..}Interface I2 extends I1{..}Interface I3 extends I2{}
True
this is called as Inner Class also