Category: JAVA Programs

All you need to know about StackOverFlowError 0

All you need to know about StackOverFlowError

Follow me StackOverFlowError: Causes & Solutions StackOverFlowError is one of the common confronted JVM error. In this blog post lets learn inner mechanics of thread stacks, reasons that can trigger StackOverFlowError and potential solutions...

How to identify critical code path 0

How to identify critical code path

Follow me Before answering the question ‘How to identify critical code path?’ let me answer ‘Why identify critical code path?’ Why identify critical code path? There are a couple of answers to it: Performance...

JAVA Program to Perform String Manipulation Functions 0

JAVA Program to Perform String Manipulation Functions

Follow me JAVA Program to Perform String Manipulation Functions: class StringManipulation { public static void main(String args[]) { StringBuffer str = new StringBuffer(“Object language”); System.out.println(“Original String : “+ str); System.out.println(“Length of string ” +...

JAVA Program for using Wrapper Classes in JAVA 0

JAVA Program for using Wrapper Classes in JAVA

Follow me JAVA Program for using Wrapper Classes in JAVA: // use of wrapper class method import java.io.*; class wraperclass { public static void main(String args[]) { int roll=0; Float marks = new Float(0);...

JAVA Program to Sort Array in Ascending Order 0

JAVA Program to Sort Array in Ascending Order

Follow me JAVA Program to Sort Array in Ascending Order: class NumerSorting { public static void main(String args[]) { int number[] = {55,40,80,65,71}; int n = number.length; System.out.print(“Given list : “); for(int i =0;...

JAVA Program to Sort Array in Descending Order 0

JAVA Program to Sort Array in Descending Order

Follow me JAVA Program to Sort Array in Descending Order: class NumerSorting { public static void main(String args[]) { int number[] = {55,40,80,65,71}; int n = number.length; System.out.print(“Given list : “); for(int i =0;...

JAVA Program to Perform Multiplication of Matrix 0

JAVA Program to Perform Multiplication of Matrix

Follow me JAVA Program to Perform Multiplication of Matrix: class Twodimult { public static void main(String args[]) { int [][] A = {{1,2,3},{4,5,6},{7,8,9}}; int [][] B = {{1,2,3},{4,5,6},{7,8,9}}; int C[][] = new int[3][3] ;...

JAVA Program to Perform Addition of Matrix 0

JAVA Program to Perform Addition of Matrix

Follow me JAVA Program to Perform Addition of Matrix: class Twodimadd { public static void main(String args[]) { int [][] A = {{1,2,3},{4,5,6},{7,8,9}}; int [][] B = {{1,2,3},{4,5,6},{7,8,9}}; //int [][] B = {1,2,3,4,5,6,7,8,9}; int...

JAVA Program to Check Number is Prime or Not 0

JAVA Program to Check Number is Prime or Not

Follow me JAVA Program to Check Number is Prime or Not: class prime { public static void main(String args[]) { int i,m=0,flag=0; int n=13; //This number will be checked m=n/2; for(i=2;i<=m;i++) { if(n%i==0) {...

JAVA Program to Find Area of Circle and Cylinder using interface 0

JAVA Program to Find Area of Circle and Cylinder using interface

Follow me JAVA Program to Find Area of Circle and Cylinder using interface : interface Shape { final float pi=3.142f; public void display(); public void area(); } class Circle implements Shape { int r;...