Skip to content

Commit c3d87b1

Browse files
Introduction to Strings
1 parent 5313387 commit c3d87b1

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package com.company;
2+
import java.util.Scanner;
3+
4+
public class cwh_13_strings {
5+
public static void main(String[] args) {
6+
// String name = new String("Harry");
7+
// String name = "Harry";
8+
// System.out.print("The name is: ");
9+
// System.out.print(name);
10+
int a = 6;
11+
float b = 5.6454f;
12+
System.out.printf("The value of a is %d and value of b is %8.2f", a, b);
13+
//System.out.format("The value of a is %d and value of b is %f", a, b);
14+
Scanner sc = new Scanner(System.in);
15+
// String st = sc.next();
16+
// String st = sc.nextLine();
17+
// System.out.println(st);
18+
19+
}
20+
}

0 commit comments

Comments
 (0)