forked from natural/java2python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSwitch5.java
More file actions
21 lines (15 loc) · 445 Bytes
/
Switch5.java
File metadata and controls
21 lines (15 loc) · 445 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// tests switches with class attributes
class Switch5 {
public static final int RT_VOLUME = 48;
public static String getField( int val) {
switch( val) {
case RT_VOLUME: return "rt volume";
default: return "unknown";
}
}
public static void main(String[] args) {
Switch5 c = new Switch5();
System.out.println( c.getField(48) );
System.out.println( c.getField(49) );
}
}