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 are passing parameters?
Why javac is not recognized?
When will you define a method as static in Java?
Write a function to print Fibonacci series and Tribonacci series?
Why do people says “java is robust”?
What is the replace tool?
What is args length in java?
Explain the concept of proper inheritance?
Can extern variables be initialized?
How many characters is 2 bytes?
What is math exp in java?
Given a singly linked list, find the middle of the list in a single traversal without using temporary variable.
What is the purpose of using break in each case of switch statement?
I want to store more than 10 objects in a remote server? Which methodology will follow?
What about anonymous inner classes in java?