Skip to content

Commit 6fcd3bb

Browse files
committed
fix build
1 parent 27c1661 commit 6fcd3bb

File tree

5 files changed

+13
-28
lines changed

5 files changed

+13
-28
lines changed

compiled_starters/java/src/main/java/Main.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,13 @@
22
// import java.util.Scanner;
33

44
public class Main {
5-
65
public static void main(String[] args) throws Exception {
7-
// Uncomment this block to pass the first stage
8-
// Scanner sc = new Scanner(System.in);
9-
106
// You can use print statements as follows for debugging, they'll be visible when running tests.
117
System.out.println("Logs from your program will appear here!");
128

139
System.out.print("$ ");
1410
// Uncomment this block to pass the first stage
15-
// String input = sc.next();
11+
// Scanner scanner = new Scanner(System.in);
12+
// String input = scanner.nextLine();
1613
}
1714
}
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
import java.util.Scanner;
22

33
public class Main {
4-
54
public static void main(String[] args) throws Exception {
6-
Scanner sc = new Scanner(System.in);
7-
85
System.out.print("$ ");
9-
String input = sc.next();
6+
Scanner scanner = new Scanner(System.in);
7+
String input = scanner.nextLine();
108
}
119
}
Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
1-
@@ -1,17 +1,11 @@
1+
@@ -1,14 +1,9 @@
22
-// Uncomment this block to pass the first stage
33
-// import java.util.Scanner;
44
+ import java.util.Scanner;
55

66
public class Main {
7-
87
public static void main(String[] args) throws Exception {
9-
- // Uncomment this block to pass the first stage
10-
- // Scanner sc = new Scanner(System.in);
11-
+ Scanner sc = new Scanner(System.in);
12-
138
- // You can use print statements as follows for debugging, they'll be visible when running tests.
149
- System.out.println("Logs from your program will appear here!");
1510
-
1611
System.out.print("$ ");
1712
- // Uncomment this block to pass the first stage
18-
- // String input = sc.next();
19-
+ String input = sc.next();
13+
- // Scanner scanner = new Scanner(System.in);
14+
- // String input = scanner.nextLine();
15+
+ Scanner scanner = new Scanner(System.in);
16+
+ String input = scanner.nextLine();
2017
}
2118
}

solutions/java/01-oo8/explanation.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,8 @@ Study and uncomment the relevant code:
99

1010
```java
1111
// Uncomment this block to pass the first stage
12-
Scanner sc = new Scanner(System.in);
13-
```
14-
15-
```java
16-
// Uncomment this block to pass the first stage
17-
String input = sc.next();
12+
Scanner scanner = new Scanner(System.in);
13+
String input = scanner.nextLine();
1814
```
1915

2016
Push your changes to pass the first stage:

starter_templates/java/src/main/java/Main.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,13 @@
22
// import java.util.Scanner;
33

44
public class Main {
5-
65
public static void main(String[] args) throws Exception {
7-
// Uncomment this block to pass the first stage
8-
// Scanner sc = new Scanner(System.in);
9-
106
// You can use print statements as follows for debugging, they'll be visible when running tests.
117
System.out.println("Logs from your program will appear here!");
128

139
System.out.print("$ ");
1410
// Uncomment this block to pass the first stage
15-
// String input = sc.next();
11+
// Scanner scanner = new Scanner(System.in);
12+
// String input = scanner.nextLine();
1613
}
1714
}

0 commit comments

Comments
 (0)