How to input From user in Java Programm ?????

you have to must know about the function.

this function are built-ed function not user define function in java.

first of all you have to include this function if you wanna take input from user

import java.util.*;
and also we also need a scanner statement

Scanner in= new Scanner(System.in);
and input get function are following

for integer:
a=in.nextInt();
for float:
a=in.nextFloat();
for double:
a=in.nextDouble:

for string :

a=in.nextLint();

for character you have add a main function to get input in character form
that's why we will discuss it later....

How to Swap two values in java Program

class swp
{
public static void main (String arg[])
{
int x,y,z;
x=5;
y=10;
z=x;
x=y;
y=z;
System.out.print ("X = ");
System.out.println ( x );

System.out.print ("Y = ");
System.out.println ( y );

System.out.print("\n\n\t\tDeveloped by AhsAn....!!\n\n\n");


}





}

The java Programm that read temperature in celsius and convert it into Foreign height

class changer
{
public static void main (String arg[])
{
double tC, tF;
/*tc is veritable of temperature in Celsius and tF is for temp in fahrenhite*/

tC=50;

tF=1.8*tC+32;

System.out.print (" Temperature in Fahrenhite is : ");
System.out.println(tF);
System.out.println( "\n\n\t\tDeveloped by AhsAn! " );

}



}

How to calculate Bill by predefine Value Java Program

class bill
{
public static void main (String arg[])
{
double pr,cr,un,ba;

/*pr = previous reading , cr= current reading, un= consume units, ba= bill amount*/
pr=700;

cr=1500;
un= cr-pr;

ba= 5*un; /* 5 is rate per unit*/

System.out.println ("Your Consume Units is : "+un);

System.out.println ("Your bill amount is : "+ba);


System.out.print("\n\n\t\tDeveloped by AhsAn....!!\n\n\n");

}
}

How to Find the volume of Cube In Java Program

class vol
{
public static void main (String arg[])
{
double v, r;

r=4;
/* '4 ' is pre- define value of of radius(r)*/


v=4/3*(3.14*r*r*r);
System.out.println (" volume of the sphere is :"+v);


System.out.print("\n\n\t\tDeveloped by AhsAn....!!\n\n\n");


}
}

How to Declare &initialize the variable in simple java programm

class initialize
{public static void main (String arg[])
{
 int a;  //declare
 a=2; //initialize
int b=4;  //declare and initialize
c=a+b; //add variable
System.out.print("The total of two variable =");
System.out.print(c);   //Display variable
}}

How to show multi statement in single line

class a
{
public static void main(String arg[])
{
System.out.println("\t Name : Sulman\n\t\tProgram: BSIT\n\t\t\tsemester: II");
/* \t for tab space or \n is use for new line*/

}
}