Is it possible to create object with out its default
constructor? if possible how? else not possible? justify
Answer Posted / suresh royal
yes we can create object without using default constructor.
we can use argument constructor...
this is the example prg
===========================================
class ExArgCon
{
ExArgCon(int a)
{
System.out.println("arg constroctor");
}
public void m1()
{
System.out.println("m1() method");
}
public static void main(String[] args)
{
ExArgCone = new ExArgCon(10);
e.m1();
}
}
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is the list interface?
What is the nested interface?
Write a program in java to establish a connection between client and server?
What is the primitive type byte?
What is meant by interface?
What is the difference between instanceof and isinstance?
What are the limitations of procedural programming approach?
Considering notepad/ie or any other thing as process, what will happen if you start notepad or ie 3 times? Where 3 processes are started or 3 threads are started?
What are operators and its types?
What is console based application in java?
Is Constructor possible in abstract class in java ?
What is a protected void?
What an i/o filter in java programming?
Define Multiprogramming and Multiprocessing in java.
What is classname class in java?