-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAssignment33.java
More file actions
55 lines (27 loc) · 1.18 KB
/
Assignment33.java
File metadata and controls
55 lines (27 loc) · 1.18 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 abhilash_Asignments;
//Intialisation and declartion of all methods of scanner class
import java.util.Scanner; //scanner class is a public specfier
public class Assignment33 //class
{
public static void main(String[] args) //main method
{
Scanner v1 = new Scanner(System.in); //scanner importing
//System.out.println(v1);
System.out.println("enter the int value ;");
int a = v1.nextInt(); //int data type
System.out.println("enter value : " + a);
System.out.println("enter the int Byte ;");
byte Byte_value = v1.nextByte();
System.out.println("enter value : " + Byte_value);
System.out.println("enter the value boolean");
boolean boolean_value = v1.nextBoolean();
System.out.println("entered value ;" + boolean_value);
System.out.println("Enter the value of long_data");
double double_value = v1.nextDouble();
System.out.println("entered value of double: " + double_value);
System.out.println(" enter the value float");
float float_value = v1.nextFloat();
System.out.println("result-->" + float_value);
System.out.println("entered value ");
}
}