Application Programming Interface (API) in Java

An application programming interface is a collection of prewritten packages, classes, and interfaces with their respective methods, fields and constructors. Similar to a user interface, which facilitates interaction between humans and computers, an API serves as a software program interface facilitating interaction. In Java, most basic programming tasks are performed by the API’s classes and […] Continue reading →

How to set path in Java

The path is required to be set for using tools such as javac, java etc. If you are saving the java source file inside the jdk/bin directory, path is not required to be set because all the tools will be available in the current directory. But If you are having your java file outside the […] Continue reading →

What is Java?

What is Java Java is a programming language and a platform.Java is a high level, robust, secured and object-oriented programming language. Platform: Any hardware or software environment in which a program runs, is known as a platform. Since Java has its own run-time environment (JRE) and API, it is called platform. Where Java is used? […] Continue reading →

Java Overview

Java is a high-level programming language developed by Sun Microsystems and released in 1995. Java runs on a many platforms, such as Windows, Mac OS, and the various versions of UNIX. Feature of Java: Object Oriented: Java is an object oriented language. In Java, everything is an Object. Java can be easily extended since it […] Continue reading →

print the pyramid of digits in pattern

//Write a C program to print the pyramid of digits in pattern. #include <stdio.h> main() { int i,s,r,k=0,count,count1; count=0; count1=0; printf(“Enter the number of rows: “); scanf(“%d”,&r); for(i=1;i<=rows;++i)   /*loop for rows*/ { for(s=1;s<=r-i;s++) /* loop for space*/ { printf(” “); count++; } while(k!=2*i-1) { if (count<=r-1) { printf(“%d “,(i+k)); count++; } else { count1++; printf(“%d […] Continue reading →

Automorphic number in Java

An Automorphic number is the number that is contained in the last digit(s) of its square.write a program in java to accept a number and check whether it is an Automorphic or not.use the function name as digits(int n) that returns the last digit(s)present in the number. e.g is an Automorphic number.the square of 25 […] Continue reading →

Draw Rectangle Dots at Random Locations in an Applet

/*   Write a program to Draw Rectangle Dots at Random Locations in an Applet This Java example shows draw dots at random locations at specified interval using Java Thread and Applet classes. */ import java.applet.Applet; import java.awt.*; import java.awt.Dimension; import java.awt.Graphics; public class doot extends Applet implements Runnable{ Thread t; public void init(){ //start new […] Continue reading →