- 浏览: 798692 次
- 性别:
- 来自: 上海
最新评论
-
心存高远:
谢谢作者分享,刚好看到这里不太明白,现在茅塞顿开。不过runt ...
关于 Maven的传递依赖的理解 -
sxlkk:
851228082 写道甚至在某次技术会议现场遇到《Maven ...
关于 Maven的传递依赖的理解 -
851228082:
851228082 写道a----compile----b-- ...
第五章 坐标和依赖 -
851228082:
a----compile----b-----provided- ...
第五章 坐标和依赖 -
851228082:
甚至在某次技术会议现场遇到《Maven in action》的 ...
关于 Maven的传递依赖的理解
文章列表
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();
...