Prime number program in java using while loop

Here we generate and check prime number using while loop in java so that we titled this prime number program in java using while loop. 1 What is a Prime Number A prime number is a whole number that has only two factors 1 and the number itself. For example, 23 is a prime number, … Read more

Simple Calculator in Java Applet

Java Applet provides a GUI way to create a program and its interface, Here we are creating Simple Calculator in Java Applet with GUI and its processing. As we have already learned about applet and applet life cycle. Here we have discussed two simple calculator programs using the applet. 1 Simple calculator program in java … Read more

Concatenate & Buffer File in Java

Here we will concatenating and store buffering files in java using BufferedInputClass and BufferedOutputClass. Concatenate: It is possible to concatenate two or more files and save in a different file. In java, by using SequenceInputStream class we can concatenate two or more files. Buffer Files: In java, we can create a buffer to store temporary … Read more

JTable Pagination in Java JDBC and MySQL Database

Here we will see how to develop JTable Pagination in java. We will use JDBC prepared statement and MySQL Database. We used NetBeans IDE and Jdk 1.8 to develop this project. Our Project Structure is as below To develop this project we used Book Example. Project Development Steps are 1 Create Table in MySQL Database … Read more

Gson parse json array with example

Gson parses JSON array meaning to Parsing JSON array with Google Gson library. Follow these steps to read JSON Array To read jsonString as an array we use the following syntax Gson gson=new Gson(); ElementType [] refVar=gson.fromJson(jsonString,ElementType[].class); To read jsonString as List TypeToken is used to find the type of class List eList=(List)gson.fromJson(reader, new TypeToken(){}.getType()); … Read more

Thread isAlive() and join() Methods in Java

Here we will discuss the Thread isalive() and join() method in java There are two ways to determine whether a thread has finished or not. Read More: Thread Concepts Thread Life Cycle in JavaMultithreading in Java Thread Creation Method Use ExampleThread Priorities in JavaMain Thread in JavaThread Yield method in JavaThread Synchronization in JavaThread suspend() … Read more

User Defined exception in Java | Java custom exception examples

In Java programming, it is possible to create our own exceptions and such exception are called user-defined exceptions in Java. The exception class is a predefined class. Any user-defined exception created by us must be a subclass of the predefined Exception class and created by extending the Exception class. Read More What is user defined … Read more

Java string replace:string character whitespace vowel regex

Here we will see Java string replace examples with replacing the string, replacing characters, replacing whitespace vowels, and using a regular expression to replace string and substring. Java string replace Example: use of replace() Java String replace() is used to replace substring in given string.

In this example, Joker is replaced with Poker and … Read more

Employee details program in java using class and object

Employee details program in java as below. Here two classes are created Details of these two classes are as below java program for employee details using class and object employee class in java : This class contains various fields of employees like id, fname, lname, address etc. Its corresponding getter and setter method are … Read more

Method Overloading with examples in Java

what is method overloading in java? In Java programming, Defining two or more methods with the same name with different parameter list are called Method Overloading in Java. Like void add(int a,int b);void add(double a, double b);void add(String a,String b);int add(int a,int b,int c); In method overloading, the method return type may be different. The … Read more