Skip to content

Commit 27c1661

Browse files
committed
Use diff function
1 parent c4af6a8 commit 27c1661

File tree

5 files changed

+18
-18
lines changed

5 files changed

+18
-18
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
// Uncomment this block to pass the first stage
2-
// import java.util.Scanner;
2+
// import java.util.Scanner;
33

44
public class Main {
55

66
public static void main(String[] args) throws Exception {
77
// Uncomment this block to pass the first stage
8-
// Scanner sc = new Scanner(System.in);
8+
// Scanner sc = new Scanner(System.in);
99

1010
// You can use print statements as follows for debugging, they'll be visible when running tests.
1111
System.out.println("Logs from your program will appear here!");
1212

1313
System.out.print("$ ");
1414
// Uncomment this block to pass the first stage
15-
// String input = sc.nextLine();
15+
// String input = sc.next();
1616
}
1717
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import java.util.Scanner;
1+
import java.util.Scanner;
22

33
public class Main {
44

55
public static void main(String[] args) throws Exception {
6-
Scanner sc = new Scanner(System.in);
6+
Scanner sc = new Scanner(System.in);
77

88
System.out.print("$ ");
9-
String input = sc.nextLine();
9+
String input = sc.next();
1010
}
1111
}
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
@@ -1,17 +1,11 @@
22
-// Uncomment this block to pass the first stage
3-
-// import java.util.Scanner;
4-
+import java.util.Scanner;
3+
-// import java.util.Scanner;
4+
+ import java.util.Scanner;
55

66
public class Main {
77

88
public static void main(String[] args) throws Exception {
99
- // Uncomment this block to pass the first stage
10-
- // Scanner sc = new Scanner(System.in);
11-
+ Scanner sc = new Scanner(System.in);
10+
- // Scanner sc = new Scanner(System.in);
11+
+ Scanner sc = new Scanner(System.in);
1212

1313
- // You can use print statements as follows for debugging, they'll be visible when running tests.
1414
- System.out.println("Logs from your program will appear here!");
1515
-
1616
System.out.print("$ ");
1717
- // Uncomment this block to pass the first stage
18-
- // String input = sc.nextLine();
19-
+ String input = sc.nextLine();
18+
- // String input = sc.next();
19+
+ String input = sc.next();
2020
}
2121
}

solutions/java/01-oo8/explanation.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ Study and uncomment the relevant code:
44

55
```java
66
// Uncomment this block to pass the first stage
7-
import java.util.Scanner;
7+
import java.util.Scanner;
88
```
99

1010
```java
1111
// Uncomment this block to pass the first stage
12-
Scanner sc = new Scanner(System.in);
12+
Scanner sc = new Scanner(System.in);
1313
```
1414

1515
```java
1616
// Uncomment this block to pass the first stage
17-
String input = sc.nextLine();
17+
String input = sc.next();
1818
```
1919

2020
Push your changes to pass the first stage:
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
// Uncomment this block to pass the first stage
2-
// import java.util.Scanner;
2+
// import java.util.Scanner;
33

44
public class Main {
55

66
public static void main(String[] args) throws Exception {
77
// Uncomment this block to pass the first stage
8-
// Scanner sc = new Scanner(System.in);
8+
// Scanner sc = new Scanner(System.in);
99

1010
// You can use print statements as follows for debugging, they'll be visible when running tests.
1111
System.out.println("Logs from your program will appear here!");
1212

1313
System.out.print("$ ");
1414
// Uncomment this block to pass the first stage
15-
// String input = sc.nextLine();
15+
// String input = sc.next();
1616
}
1717
}

0 commit comments

Comments
 (0)