-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebugTool.java
More file actions
37 lines (32 loc) · 709 Bytes
/
debugTool.java
File metadata and controls
37 lines (32 loc) · 709 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
import java.util.Scanner;
public class debugTool {
public static void main(String[] args){
try{
Float f1 = new Float("3.0");
int x = f1.intValue();
byte b = f1.byteValue();
double d = f1.doubleValue();
System.out.println(x + b + d);
}catch (NumberFormatException e)
{
System.out.println("bad number");
}
/* Here is a comment **** */
// int i = 010;
// int j = 07;
// System.out.println(i);
// System.out.println(j);
// try{
// System.out.println("A");
// badMethod();
// System.out.println("B");
// }catch(Exception ex){
// System.out.println("C");
// }finally{
// System.out.println("D");
// }
}
public static void badMethod(){
throw new Error();
}
}