- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprinting.java
More file actions
Latest commit
18 lines (18 loc) · 533 Bytes
/
Copy pathprinting.java
File metadata and controls
18 lines (18 loc) · 533 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
importjava.lang.*;
publicclassprinting
{
publicstaticvoidmain(Stringargs[])
{
intx=10,y=20;
floatb=12.55f;
charc='A';
Stringstr= "Hello";
System.out.print("char is"+c);
System.out.println("String is"+str);
System.out.printf("Number and characters are %1$f %3$c %2$s",b,str,c);
System.out.println("Number is"+y);
System.out.println(x+y);
System.out.println("Number is "+x+y);
System.out.println("Number is "+(x+y));
}
}