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
Can main() method in java can return any data?
How do we access static members in java?
What are the differences between the constructors and methods?
What is a byte array?
Is intellij better than eclipse?
What is meant by 'bit masking' in java?
Is there a sort function in java?
What does it mean that a method or field is “static”?
What is consumer in java?
What is the difference between the direct buffer and non-direct buffer in java?
What are different types of control structures?
Which is dependent variable?
What is incompatible types in java?
which class is the wait() method defined in? : Java thread
What does a void function return?