-
-
What is synchronization and why is it important
With respect to multithreading, synchronization is the capability to control the access ofmultiple threads to shared resources. Without synchronization, it is possible for onethread to modify a shared object while another thread is in the process of using orupdating that object's value. This often leads to significant errors.
-
-
-
-
What is the Collections API
The Collections API is a set of classes and interfaces that support operations oncollections of objects.
-
-
What is the List interface
The List interface provides support for ordered collections of objects.
-
-
-
What are interfaces?
Interfaces provide more sophisticated ways to organize and control the objects in your system. The interface keyword takes the abstract concept one step further. You could think of it as a “pure” abstract class. It allows the creator to establish the form for a class: method names, argument lists, and return types, but no method bodies. An interface can also contain fields, but The interface keyword...
-
-
-
-
}
}
public class test1 extends test
{
public void say()
{
super.hello();
hello();
}
public void main(String arg[])
{
test1 t = new test1();
t.say();
}
}
In the above code what will be difference of super.hello(); and hello();. What is use of super instead of calling directly method name.
">Public class test{ public void hello() { System.out.println("Helllo"); }}public class test1 extends test{ public void say(){ super.hello(); hello();}public void main(String arg[]){ test1 t = new test1(); t.say();}}In the above code what will be difference of super.hello(); and hello();. What is use of super instead of calling directly method name.
-
-
-
-
-
Java Interview Questions
Ans