Answer Posted / dhawal
class A
{
int a=10;
}
class B extend A
{
public static void main(String[] a)
{
B objB;
objB=new A();
System.out.println("Value of a is"+objB.a);
}
}
Is This Answer Correct ? | 2 Yes | 13 No |
Post New Answer View All Answers
Are the imports checked for validity at compile time? Will the code containing an import such as java.lang.abcd compile?
Can a constructor call another constructor?
What if static is removed from main method?
How to split arraylist elements in java?
design an lru cache in java?
What is the purpose of skeleton and stub?
What are the two types of java programming?
How many inner classes can a class have?
Can we nested try statements in java?
What is the difference between break and continue statements?
What are the features of junit?
What is difference between path and classpath in java?
What is core java called?
What is a string token?
how does the run() method in runnable work? : Java thread