0% found this document useful (0 votes)
4 views2 pages

Java 2

The document contains three Java programs that prompt the user for input. The first program asks for an integer, the second for a string (name), and the third for a double. Each program then outputs the entered value back to the user.

Uploaded by

kowsikur2012
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

Java 2

The document contains three Java programs that prompt the user for input. The first program asks for an integer, the second for a string (name), and the third for a double. Each program then outputs the entered value back to the user.

Uploaded by

kowsikur2012
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

int number

package MainJava;

import [Link];

public class MainJava {

public static void main(String[] args) {

Scanner input = new Scanner([Link]);

int number;

[Link]("enter yout number: ");

number = [Link]();

[Link]("your number is: "+number);

String name
package Main1Java;

import [Link];

public class Main1Java {

public static void main(String[] args) {

Scanner input = new Scanner ([Link]);

String name;

[Link]("enter your name :" );

name = [Link]();

[Link]("your name is: "+name );

}
}

Double number
package Main3Java;

import [Link];

public class Main3Java {

public static void main(String[] args) {

Scanner input = new Scanner ([Link]);

double number;

[Link]("enter your number : ");

number = [Link]();

[Link]("your number is: "+number );

You might also like