-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIntro.java
More file actions
37 lines (33 loc) · 871 Bytes
/
Intro.java
File metadata and controls
37 lines (33 loc) · 871 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import java.io.*;
class Intro {
public static void main(String args[])
{
//Assignment 1
for(int i = 0; i <= 5; i++){
System.out.println("*****");
}
//Assignment 2
int int1 = 10;
int int2 = 10;
float float1 = 12.5f;
String string1 = "Java programming";
System.out.println(int1);
System.out.println(int2);
System.out.println(float1);
System.out.println(string1);
//Assignment 3
br();
}
static void br()
{
try {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
System.out.print("Enter your name: ");
String name = reader.readLine();
System.out.println("Hello " + name + "!");
}
catch (IOException ioe)
{
}
}
}