Thread state in Java is also known as the life cycle of a thread. There are seven life stages for a thread in Java. Any thread used in Java will fall under any of one of those seven categories. The life cycle of a thread is controlled by JVM (Java Virtual Machine). The following are […]
Explain Multiple Inheritance in Java?
Multiple inheritance can be defined as the single class inherited from multiple classes but there is no multiple inheritance in Java. The goal of Java designers is to create a simple programming language; the designers felt that using multiple inheritance in Java will make it too complex. The use of multiple inheritance in Java may […]
What is Java Serialization ?
Serialization is a process where a present state of object will be saved in a bytes stream. The byte stream is neutral so objects created in other platform can be deserialized in other platforms. De-serialization is exactly the reverse option of serialization. Serialization process are mainly used during EJB, JMS, JPA and RMI. java.io.serializable interface […]
Java Access Modifiers - Interview question
Access Modifiers in Java will help you to structure your program for suitable scoping. This article will assist you in learning the difference between private, public and protected access modifiers. Some examples are also explained about how to use these access modifiers. Public Public access modifier is the most popular keyword used in Java. Public […]
Is it Possible to Instantiate Interface in Java?
Interfaces belong to abstract class in Java which prevents it from instantiating. If an interface is instantiated, it will rebel the model of Object Oriented Programming because some methods present in an interface does not have any definitions. Instantiating an interface will result in compile error. Interfaces does not have any variables or method bodies. […]
How to Interface Anonymous Inner Class?
It is possible to implement an interface or extend the class of anonymous inner class. The interfaces of anonymous inner classes are always static. An anonymous inner class can either implement an interface or extend the class but it cannot do both at the same time. Example for creating interface in anonymous inner class In […]
How to Create Threads in Java?
Threads in Java are similar to any other objects in Java. Usually, threads are instance of Java class java.lang.thread or thread will be the instance of subclass belonging to the class java.lang.thread. Thread classes will use methods and constructors to perform operations on the thread. Extension of object class and implementation of runnable interface are […]
- « Previous Page
- 1
- 2
- 3
- 4
- …
- 7
- Next Page »