-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVariables.java
More file actions
55 lines (34 loc) · 1.04 KB
/
Variables.java
File metadata and controls
55 lines (34 loc) · 1.04 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
package com.beyzakaynar.javalearning;
public class Variables {
public static void main(String[] args) {
//Integer = int
//Double - Float
//String
//boolean
int x = 5;
int y = 4;
int age = 19;
int result = age*4/3;
System.out.println(result);
//////////////////////////
final double pi = 3.14;
//final deðiþkenimizi sabit yaptý
double r = 5.0;
System.out.println(2*pi*r);
/////////////////////////////
float a = 19.0f;
//Sonuna f koyduðumuzda sistem float olduðunu anlar
System.out.println(a*4/3);
//////////////////////////////
String name = "James";
String surname = "Matt";
String fullname = name + " " + surname;
System.out.println(name);
System.out.println(surname);
System.out.println(fullname);
/////////////////////////////
boolean isAlive = true;
isAlive = false;
System.out.println(isAlive);
}
}