Input and Output in Java

Introduction of Input and Output in Java Java has provided several APIs (also called Java Input and Output(I/O)) to read and write files since its initial releases. With subsequent releases, Java I/O has been improved, simplified, and enhanced to support new features. I/O Streams There are two types of Input Read more…

Loading

Exception Handling in Java

Introduction of Exception Handling in Java An exception handling in Java is a condition that causes a problem, which stops program execution suddenly and abnormally, from continuation from the point of occurrence of it. Definition of Exception Handling in Java Exceptions are events and runtime hidden errors that arise suddenly and Read more…

Loading

Multi-threading in Java

Introduction of Multi-threading in Java Multi-threading in Java is also sometimes called Thread-based Multitasking. Definition Multi-threading is a process of executing more than one thread concurrently/simultaneously of the same process to complete it effectively at the micro level. Features/Characteristics of Thread A Java thread is a lightweight sub-process or smallest Read more…

Loading

Package in Java

Definition of Package in Java A package in Java is a collection of similar types of related sub-packages, classes, interfaces, enumerations, annotations, etc. in separate bundles that provide easy access, security, protection, and namespace (storage place) management. Features/Characteristics  It behaves like a container that mainly stores similar types of related Read more…

Loading

Inheritance in Java

Introduction of Inheritance in Java Inheritance in Java is a fundamental concept in object-oriented programming that facilitates the creation of a hierarchy of classes, promoting code reuse and enabling the creation of more specialized classes based on existing ones. Definition of Inheritance in Java Inheritance is the ability of one Read more…

Loading

Swing GUI

Introduction of Swing GUI Swing GUI provides richer components and improved functionality over AWT, while JavaFX is a more modern and flexible GUI framework. JavaFX is another popular GUI framework for Java, introduced in Java SE 8, which provides enhanced capabilities and a more contemporary approach to GUI development. However, Read more…

Loading

String and StringBuffer in Java

Difference/Distinction between String and StringBuffer in Java Introduction In several other programming languages, strings are stored in arrays of characters (such as C, C++, Pascal, etc.). However, in Java strings are a separate object type, called String. Java implements strings as objects of the String class when no change in Read more…

Loading

Class and Object in Java

The concept of Class and Object in Java can be categorized into –  Class in Java A class is a blueprint or template that defines the properties and behaviors of objects. A class serves as a blueprint for creating instances of objects, which are individual entities that belong to a Read more…

Loading

Array Examples in Java

One-Dimensional Array Examples in Java Example : Array examples in Java to store and display a static numeric value. Example : Array examples in Java to display one-dimensional array form in two-dimensional array form. Example : A Java Program to display the total of user-accepted values. Example : A Java Read more…

Loading