-
Notifications
You must be signed in to change notification settings - Fork 0
/
labb1_1.java
31 lines (30 loc) · 942 Bytes
/
labb1_1.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
//Author: Edvin Wahlberg 910721
// Labb 1 Uppgfit 1
public class labb1_1
{
//fun main
//prints out different types of data
public static void main(String[] args)
{
boolean data1 = true;
float data2 = 45.8F;
int data3 = 29;
boolean data4 = data3 < 10;
float data5 = 12 / 5;
float data6 = data3 * data5;
int data7 = 10 % 3;
String data8 = "Java programmering";
char data9 = 'b';
float data10 = (float)data5 / 4;
System.out.println ("Variabeln data1: " + data1);
System.out.println ("Variabeln data2: " + data2);
System.out.println ("Variabeln data3: " + data3);
System.out.println ("Variabeln data4: " + data4);
System.out.println ("Variabeln data5: " + data5);
System.out.println ("Variabeln data6: " + data6);
System.out.println ("Variabeln data7: " + data7);
System.out.println ("Variabeln data8: " + data8);
System.out.println ("Variabeln data9: " + data9);
System.out.println ("Variabeln data10: " + data10);
}
}