interface Destination
{
String readLabel()
}
class Parcel10 {
public class p
{
}
public static class PDestination
implements Destination
{
private String label;
public PDestination(String whereTo) {
label = whereTo;
}
public String readLabel() { return label; }
}
}
class TTTT
{
public void t()
{
Parcel10 c2=new Parcel10();
Parcel10.p p1=c2.new p();
//这里怎么建立Parcel10的static内类PDestination 的实例?以下是错误的
Parcel10.PDestination pd=c2.new PDestination("aaaaa");
}
}
{
String readLabel()
}
class Parcel10 {
public class p
{
}
public static class PDestination
implements Destination
{
private String label;
public PDestination(String whereTo) {
label = whereTo;
}
public String readLabel() { return label; }
}
}
class TTTT
{
public void t()
{
Parcel10 c2=new Parcel10();
Parcel10.p p1=c2.new p();
//这里怎么建立Parcel10的static内类PDestination 的实例?以下是错误的
Parcel10.PDestination pd=c2.new PDestination("aaaaa");
}
}
解决方案 »
- System.out.println(3L == 3f);结果为什么为true
- JScrollPane怎么设置他的边框可以自由拖动?
- 看了核心技术7还用买编程思想4吗?
- (急)linux oracle jdbc
- 客户端socket
- 請問:如何比較一個字符串是否有兩個相同的字符,如果有,去掉第一個字符?3Q!
- 为什么在DOS命令下,我的JAVA程序不能运行!
- com.jacob.com.ComFailException: Can't map name to dispid: Visible
- 一个ASP直接调用另一个ASP
- 为什么我在win2000下装不好Tomcat4.0,神(高手)啊,救救我吧……
- 自己生成学号
- 一个ACCESS查询问题
1.PDestination既然是静态类,如果想创建一个PDestination的对象用Parce100类是没有问题的.
2.PDestination是静态的,他所操作的数据和方法是不是也应该是静态的,这也是个问题.
3.静态类创造出来的对象到底是什么状态,有哪些特性,调用的构造器有没有什么限制都不知道.
我也是初学者,只能做这么多,等待高手解决.
2、创建静态内部类的正确方法应该是:
Parcel10.PDestination pd = new Parcel10.PDestination("aaaaa");