Category: Java Programming

Java Applet Program to Add Two Numbers
Java Programming

Java Applet Program to Add Two Numbers

To build an applet, first of all, we need to create an applet code(program_name.java file). After successful compilation, its corresponding( program_name.class) file is created. Then a web page also known as an HTML document(  ) is to be developed. Once the HTML document(.html) is created, the applet is to be inserted into it. Finally, the […]

Rekha Setia 
Armstrong Number in Java
Java Programming

Armstrong Number in Java

Program to Check Armstrong Number Armstrong number is that number which is of three  integer digits, which sum of the cube of its individual digits is equal to that number which we enter like 153, the cube of 1 and the cube of 5, and the cube of 3 and the sum of both (1*1*1)+(5*5*5)+(3*3*3)=153 […]

Rekha Setia 
Draw a Chessboard in Java Applet
Java Programming

Draw a Chessboard in Java Applet

Java Program for Chess Game Each square(rectangle) in the chessboard is 20 pixels by 20 pixels. The squares are grey and black. If the row and column are either even or odd, then the color is Grey. Otherwise, change the color to Black. import java.awt.*; import java.applet.*; public class Checkerboarrd extends Applet {    public […]

Rekha Setia 
Accessing Interface in Java
Java Programming

Accessing Interface in Java

The variables(int blue, int yellow, int pink) of an interface are always declared as final. Final variables are those variables, whose values are constants and can’t be modified(changed). The class that implements the interface will use the variables as declared within the interface and can’t modify( changed) the value of the variable. How to define […]

Rekha Setia 
2D Array in Java
Java Programming

2D Array in Java

In Java, multidimensional arrays are also applied as arrays of arrays. 2D(two-dimension i.e tabular form) array is the generally used and simplest multi-dimensional array(like excel sheet(grids)). 2D arrays are represented in a row-columns([3][4]) form, and the terms “rows”[3]  and  “columns”[4] are used in computing. Syntax…. Declaration – Syntax:                Data_Type[][] Array_Name = new int[Row_Size][Cols_Size];       […]

Rekha Setia 
Access Modifiers in Java
Java Programming

Access Modifiers in Java

ACCESS MODIFIERS……. Access modifier is a reserve key word  or we can say visibility controls which is used to restrict access.We can use these access modifier  to determine whether  a fields or methods in a class ,can be called or used by another class or sub class or not.That means these access modifiers can prevent […]

Rekha Setia 
What is Java
Java Programming

What is Java

JAVA  programming language was developed by Sun Microsystems(an American technology company) in 1991(developed by the team headed by James Gosling),. This language was originally called,  “Green talk”, After that, it was called “Oak”but was renamed(OAK  was already a trademark) “Java” in 1995. JAVA is a computer language to specify textual representation by writing source code, […]

Rekha Setia 
How To Take Input From User In Java
Java Programming

How To Take Input From User In Java

In this tutorial, I am going to show you how to take input from users in java using two different ways. You can follow any method (Scanner or BufferedReader) according to your convenience. To understand how we get input from users in java we first must know of the following two things : System. out – […]

Rekha Setia 
DATA TYPES IN JAVA
Java Programming

 DATA TYPES IN JAVA

Before we talk about data type first we know about variables because data type is used with variables. Without variables the meaning of the data type is nothing, it’s incomplete. Data types are used when you create variables in the program. Each variable is assigned a data type. Variable is the name that is used […]

Rekha Setia