Java Examples

Java Program Demonstrating usage of String-buffer Class and String-builder Class

 6 total views

 6 total views Previous Next In this article, we will create a program that uses both String-Builder and String-Buffer Class and displays the output. The main difference between these two class is that String-Builder Class is not threading safe like String-Buffer Class. String-Buffer class objects are like String objects, but it can be modified at any …

Java Program Demonstrating usage of String-buffer Class and String-builder Class Read More »

Java Program using Multiple Classes

 142 total views

 142 total views Previous First Java is an object-oriented programming language. You can create multiple classes in Java and create a class hierarchy such that one class can call another class. Do not confuse this with Java inheritance because, in class inheritance, there is a parent-child relationship between classes. The derived or the child class always inherit …

Java Program using Multiple Classes Read More »

Program to demonstrate Constructor Overloading in Java

 51 total views

 51 total views Previous Next This is a simple program to demonstrate constructor overloading in Java programming language. The constructor is a special method that the same name as that of the public class. There are different methods of overloading the constructors. This is a simple program to demonstrate the constructor overloading concepts and it is …

Program to demonstrate Constructor Overloading in Java Read More »