-
Notifications
You must be signed in to change notification settings - Fork 0
/
FirstClass.java
42 lines (29 loc) · 926 Bytes
/
FirstClass.java
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
38
39
40
41
42
/**
* main
*/
public class FirstClass {
public static void main(String[] args) {
//variables
String name = "tony stark";
int age = 52;
double price = 25.25;
int a = 12;
int b = 46;
name = "iron man";
age = 64;
int sum = a + b;
System.out.println(sum);
System.out.println(name);
System.out.println(age);
System.out.print("HEllo"); /* output will be in the same line if we dont use ln or \n */
System.out.println("HEllo");
System.out.println("Hello World");
System.out.println("*");
System.out.print("**\n");
System.out.println("***");
System.out.println("****");
System.out.print(" *\n **\n ***\n****");
System.out.print("***");
System.out.print("****");
}
}