`
leonzhx
  • 浏览: 798692 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论
文章列表
import java.util.HashSet; import java.util.LinkedHashSet; public class Test { public static void main(String[] args) throws IllegalAccessException, InstantiationException { Class<LinkedHashSet> a = LinkedHashSet.class; LinkedHashSet ao = a.newInstance(); Class<HashSet& ...
public class Test { public static void main ( String[] args) { Test a = new Test() System.out.println(a); } public String toString() { return "My address is : " + this; } }   请问以上程序的输出是:
import java.util.Scanner; import java.util.regex.MatchResult; public class Test { public static void main(String[] args) { Scanner s = new Scanner("abc12*abc22**abc32*"); s.useDelimiter("\\*"); s.next("abc\\d."); MatchResult m ...
import java.util.*; class D { final static int i = 1; final static int j = Test.getInt(); static { System.out.print("A"); } } public class Test { static int getInt() { return 2; } public static void main(String[] args) { i ...
public class Test { public static void main(String[] args) throws ClassNotFoundException { Class<Integer> c = (Class<Integer>) Class.forName("java.lang.Double"); System.out.println(c); } }  请问以上程序输出是:
public class Test { public static void main(String[] args) throws ClassNotFoundException { System.out.println(Class.forName(int.class.getCanonicalName())); } }   请问以上程序的输出是:
import java.util.regex.Matcher; import java.util.regex.Pattern; public class Test { public static void main(String[] args) { Pattern p = Pattern.compile("abc"); Matcher m = p.matcher("abcabc"); if (m.find()) System.out.print(m.start ...
import java.util.regex.Matcher; import java.util.regex.Pattern; public class Test { public static void main(String[] args ) { Pattern p = Pattern.compile("(?m)^abc"); Matcher m = p.matcher("abcabc\nabcabc"); while (m.find()) System.out.print(m.sta ...
import java.util.regex.Matcher; import java.util.regex.Pattern; public class Test { public static void main(String[] args) { Pattern p = Pattern.compile("abc\\d??"); Matcher m = p.matcher("abc123abc456"); StringBuffer sbuf = new StringBuffer(); while (m.find()) ...
public class Test { public static void main(String[] args) { byte a = 0; System.out.printf("%b", a); } }  请问以上程序的输出是:
public class Test { public static void main(String[] args) { char a = 97; System.out.format("%d", a); } }  请问以上程序的输出是:
public class Test { public static void main ( String[] args) { Test a = new Test() System.out.println(a); } public String toString() { return "My address is : " + this; } }  请问以上程序的输出是:
public class Test { public static void main(String[] args) { try { f(); } catch (Exception e) { System.out.print("OuterE"); } } static void f() throws Exception { try { throw new NullPointerException(); } catch (RuntimeException e) { System.o ...
public class Test { public static void main(String[] args) { String a = "A"; String b = a; b += "B"; a.toLowerCase(); System.out.println(a); } }  请问以上程序的输出是:
以下哪段程序会编译出错: 1) class A { void f () {     try {} } }   2) class A { void f() { try { throw new Exception(); } catch (Exception e) { } } }   3) class A { void f() { try { throw new RuntimeException(); ...
Global site tag (gtag.js) - Google Analytics