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
Why are functions called methods in java?
What do you understand by classes in java?
How to find the index of the largest number in an arraylist java?
What is string args [] in java?
What is the use of hashmap in java?
What are internal variables?
Explain the difference between abstraction and encapsulation.
I want to store more than 10 objects in a remote server? Which methodology will follow?
What are the four versions of java?
How to convert string to char and vice versa?
What is high level language in computer?
What are multiple inheritances?
What is local variable and instance variable?
what is the volatile modifier for? : Java thread
What are the different types of collections in java?