Question: Which of the following is a well-known HTTP port?
A
B
C
D
E
21
B
25
C
8080
D
80
E
137
Note: Not available
public class Test31 { public static void main(String[] args) { test(); } public static void test() { try { System.out.print("-try"); return; } catch (Exception e) { System.out.print("-catch"); } finally { System.out.print("-finally"); } } }
public class Test89 { public static void main(String[] args) { T x = new T(""X"", null); x.start(); T y = new T(""Y"", x); y.start(); T z = new T(""Z"", y); z.start(); } } class T extends Thread { private Thread predecessor; private String name; public T(String name, Thread predecessor) { this.predecessor = predecessor; this.name = name; } public void run() { try { Thread.sleep((int)(Math.random()*89)); System.out.print(name); } catch (InterruptedException ie) { ie.printStackTrace(); } } }
String dateString = "2012/06/05"; Date date = new SimpleDateFormat("yyyy/MM/dd").parse(dateString); SimpleDateFormat sdf = new SimpleDateFormat("dd - MM - yyyy"); System.out.println(sdf.format(date));
String dateString = "2012/06/05"; Date date = new SimpleDateFormat("yyyy/MM/dd").format(dateString); SimpleDateFormat sdf = new SimpleDateFormat("dd - MM - yyyy"); System.out.println(sdf.parse(date));
String dateString = "2012/06/05"; Date date = new SimpleDateFormat("dd - MM - yyyy").format(dateString); SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd"); System.out.println(sdf.parse(date));
String dateString = "2012/06/05"; Date date = new SimpleDateFormat("dd - MM - yyyy").parse(dateString); SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd"); System.out.println(sdf.format(date));
public class Test15 { public static void main(String[] args) { VO a = new VO(2); VO b = new VO(3); swapONE(a, b); print(a, b); swapTWO(a, b); print(a, b); } private static void print(VO a, VO b) { System.out.print(a.toString() + b.toString()); } public static void swapONE(VO a, VO b) { VO tmp = a; a = b; b = tmp; } public static void swapTWO(VO a, VO b) { int tmp = a.x; a.x = b.x; b.x = tmp; } } class VO { public int x; public VO(int x) { this.x = x; } public String toString() { return String.valueOf(x); } }