JAVA Tutorials

Identifiers and Keywords in Java – Free Java Tutorials

Java is the among the most successful programming language. It is so because of the proper usage and declaration of fundamental which defines Java. These fundamentals include identifiers, keywords, data types and many more, and without them, any programming language cannot work. We can classify them as: Identifiers Reserved Words or Keywords Data types Literals …

Identifiers and Keywords in Java – Free Java Tutorials Read More »

Singleton Class and Private Constructor in Java : Free Java Tutorials

For any Java class, if we are allowed to create only one object, then such type of class is called a singleton class. For example, Runtime and ServiceLocator are singleton classes. We can implement a Singleton class using a private constructor. The advantage of Singleton class: Memory utilization and Performance improvement If several people have …

Singleton Class and Private Constructor in Java : Free Java Tutorials Read More »

Overloaded Constructors in Java : Free Java Tutorials

Overloaded constructors exist in Java. Within a class, we can declare multiple constructors. All these constructors are having the same name but different type of arguments. Hence, all these constructors are considered overloaded constructors. Hence, overloading concept is applicable to constructors. Example of Overloaded Constructors // Demo class class Demo { // defining three overloaded …

Overloaded Constructors in Java : Free Java Tutorials Read More »