« first day (212 days earlier)      last day (443 days later) » 

10:49 AM
public class Card {
private static int code;
public static void setCode(int c) {
code = c;
}
private int getRank() {
if (code <= 0 || code > 52) { return -1; }
int rank = code % 13;
if (rank == 0) { return 13; }
else { return rank; }
}
}
 
@cp101020304 Format your code - hit Ctrl+K before sending and see the faq
 
public class Card {
private static int code;
public static void setCode(int c) {
code = c;
}
private int getRank() {
if (code <= 0 || code > 52) { return -1; }
int rank = code % 13;
if (rank == 0) { return 13; }
else { return rank; }
}
}
 
3 messages moved from Java
 
11:28 AM
public void method() {
System.out.println("A");
try {
System.out.println("B");
otherMethod();
System.out.println("C");
} catch (NumberFormatException nfex) {
System.out.println("D");
} catch (RuntimeException rtex) {
System.out.println("E");
} finally {
System.out.println("F");
}
System.out.println("G");
}
 
1 message moved from Java
 
public void method() {
	System.out.println("A");
	try {
		System.out.println("B");
		otherMethod();
		System.out.println("C");
	} catch (NumberFormatException nfex) {
		System.out.println("D");
	} catch (RuntimeException rtex) {
		System.out.println("E");
	} finally {
		System.out.println("F");
	}
	System.out.println("G");
}
 
1 message moved from Java
 

« first day (212 days earlier)      last day (443 days later) »