-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProblem1.java
More file actions
44 lines (42 loc) · 955 Bytes
/
Copy pathProblem1.java
File metadata and controls
44 lines (42 loc) · 955 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
32
33
34
35
36
37
38
39
40
41
42
43
44
public class Main
{
void Implicit(){
byte b = 10;
System.out.println("bv:"+b);
short s = b;
System.out.println("sv:"+s);
s++;
int i=s++;
System.out.println("iv:"+i);
System.out.println("sv:"+s);
long l = i;
System.out.println("lv:"+(--l));
float f = l;
System.out.println("fv:"+(f+b));
double d = (--f);
System.out.println("dv:"+d);
show();
if(!(d==f)){
System.out.println("equal");
}
else{
System.out.println("not equal");
}
}
public static void main(String[] args) {
Main ob = new Main();
ob.Implicit();
}
static void show(){
char c ='A';
int a = ++c;
System.out.println(a);
Main ob = new Main();
String S = ob.meth1();
System.out.println(S);
}
String meth1(){
String s = "My name is charan";
return s;
}
}