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
What is the use of set in java?
Why do we need wrapper class?
What is space character in java?
What is percentage in java?
What is the meaning of 3 dots in java?
How do you sort a string in alphabetical order in java?
Detail discussions on JVM, memory management and garbage collector.
Can you instantiate the math class in Java?
What are the features of java?
define the terminology association.
How is abstraction implemented in java ?
Is string serializable in java?
What is the purpose of garbage collection in java? When is it used?
What is the main method java?
What is meant by method?