-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathweek6b.java
More file actions
31 lines (30 loc) · 916 Bytes
/
week6b.java
File metadata and controls
31 lines (30 loc) · 916 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
import java.lang.*;
import java.util.Scanner;
import java.util.Vector;
public class week6b {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
System.out.println("Enter Integer value :" );
int i = sc.nextInt();
System.out.println("Enter Double Value : ");
double d= sc.nextDouble();
System.out.println("Enter Float Value : ");
float f = sc.nextFloat();
System.out.println("Enter Char Value : ");
char c = sc.next().charAt(0);
System.out.println("Enter a Boolean Value : ");
boolean b = sc.nextBoolean();
Integer I = i;
Double D = d;
Float F = f;
Character C = c;
Boolean B = b;
Vector <Object> v = new Vector<Object>();
v.add(I);
v.add(D);
v.add(F);
v.add(B);
v.add(C);
System.out.println(v);
}
}