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 restrictions are placed on method overloading?
What is string variable?
What do you mean by synchronized non access modifier?
What does @param args mean in java?
What is the difference between a factory and abstract factory pattern?
Are constructors methods?
What are the advantages of exception handling?
What is return keyword in java?
Can java list contain duplicates?
What are the four corner stones of oop?
What are the differences between heap and stack memory in java?
How do you input a string in java?
What is an immutable object?
Can a source file contain more than one class declaration?
Is string is a data type in java?