Java Command Line Arguments
Java Programming

Java Command Line Arguments

Command line arguments are parameters that are supplied to the application program at the time of invoking it for execution. The arguments which are passed onto main() are Command line arguments. Use of Command Line Arguments in Java class  command { public static void main(String aa[]) { int cc, ii=0; String stri; cc=aa.length; System.out.println(“Number of […]

Rekha Setia 
Java Programming

Stream in Java

A stream is a water body that carries water as it flows from one point(source) to another(destination). In programming terminology, a stream can be a continuous group of data or a channel through which data travels from one point(source) to another(destination). An input stream receives data from a source into a program and an output […]

Rekha Setia 
How to Write Your First Java Program with Example
Java Programming

How to Write Your First Java Program with Example

Simple Program of Java Language import java.io.*;class welcome{public static void main(String aa[]){System.out.println(“Welcome in Java programming language”);System.out.println(“Java is developed by James Gosling”);System.out.println(“This language was initially called as Oak”);}} How to run Java Program Compile and execute : 2. Save this file as welcome.java in the bin folder using the jdk1.6.0 version. 3. Write these commands on […]

Rekha Setia 
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 
Call by Value and Call by Reference in C
C Programming

Call by Value and Call by Reference in C

Argument passing (change(a,b), change(x,y))is a technique for transferring data and information between the calling and called function. There are two ways to pass arguments to the called function: a)Call by Value b)Call by reference. Call by Value: The call by value method is the default technique for passing arguments. In this method only the copies […]

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