by sarkarijob | Sep 12, 2016 | java, java programming
Use Math.pow(double, double), or statically import pow as such:import static java.lang.Math.pow;
by sarkarijob | Sep 6, 2016 | java, java programming
*/ prime number is a number which is divisible by 1 and itself, example 2,3.for printing prime number from 1 to 3 we need to devide 1 by 1 ,2 by 1 and 2 both and 3 by 1,2,and 3.Remember 1 is not considered as prime number.so we will start from 2 so 2 is divisible by 1...
by sarkarijob | Sep 5, 2016 | java programming
/*Area and perimeter of rectangle and square using constructor overloading.Constructor overloading means there will be two or more constructor and the name of all constructors will be same only number of arguments will be different.when you pass arguments value in the...
by sarkarijob | Sep 5, 2016 | java, java programming
/*Area and perimeter of rectangle and square using constructor overloading.Constructor overloading means there will be two or more constructor and the name of all constructors will be same only number of arguments will be different.when you pass arguments value...
by sarkarijob | Sep 5, 2016 | java programming
//Constructor overloading using Box for no parameter for one parameter and for all parameters.import java.io.*;import java.util.*;class MyBox{double length;double depth;double width;//Constructor called when all three dimesions are apecified. MyBox(double l,double...
by sarkarijob | Sep 5, 2016 | java programming
//program for box using constructor import java.io.*;import java.util.*;class MyBox{ double length; double breadth;MyBox(double l,double b){ length=l; breadth=b;} double...