`
zhangyuanjava
  • 浏览: 126093 次
  • 性别: Icon_minigender_1
  • 来自: 河北
社区版块
存档分类
最新评论
文章列表
package cn.lifx.test;     public class Test    {       public static void whichFoo(Base arg1, Base arg2)        {           arg1.foo(arg2);       }         public static void main(String[] args)        {           Base b = new Base();           Derived d = new Derived();             whi ...
Java代码 public class Test   {       public static void main(String[] args)       {           Test t = new Test();                      t.compare();           t.compare2();       }              public void compare()       {           //1           Integer i1 = new Integer(1);           I ...
Java代码 public class OuterInnerTest   {       public static void main(String[] args)       {           //1           Outer outer = new Outer();           outer.show();                      //2           Outer.Inner inner = outer.getInner();           inner.show();                      //3 ...

java 之继承

public class Test   {       public static void main(String[] args)       {           TestA ta = new TestC();           ta.show();       }   }     class TestA   {       public TestA()       {           System.out.println("TestA");       }              public void show()      ...
public class Test   {       public static void main(String[] args)       {           Test t = new Test();           t.show();       }              public void show()       {           int a = 0;                      while(true)           {               try              {              ...
public class InputTest {     public static void main(String[] args)       {           C c = new C();                      try          {               c.getExcC();                          }catch(Exception e)           {               System.out.println(e.getClass().getName()) ...
Java代码 public class Test1    {       public static void main(String[] args)       {           Test2 t2 = new Test2();           System.out.println();           Test3 t3 = new Test3();       }   }     class Test2   {       static      {           System.out.println("Test2 static&qu ...
刚刚搞定了一个大bug 搞了好几个小时了 问题很简单 就是实例化一个类时无法进入其构造方法 感觉很简单 但是就是一直找不到原因 奇怪的很 后来总算找到了 原来是少了个jar包 import了不正确的类 唉 真是惭愧啊 这么简单的问题 浪费了好几个小时
如下面代码 Java代码 public class Test   {       public static int a = 2;              public static void main(String[] args)       {           Test t = new Test();                      t = null;                      System.out.println(t.a);       }   }  public class Test { public static ...
1.子类 public class Child extends Father implements Interface{ public void three(){ System.out.println("three"); } public void four(){ System.out.println("four"); } } 2.父类 public class Father {     public void one(){     System.out.println("one");     } ...
错误: 严重: Can not find a java.io.InputStream with the name [photoStream] in the invocation stack. Check the <param name="inputName"> tag specified for this action. 2008-4-17 17:04:44 org.apache.catalina.core.StandardWrapperValve invoke 严重: Servlet.service() for servlet default threw exc ...
题目:有十个外表一模一样的小球,其中九个小球的的质量相同,另外一个X不同。现在有一架天枰,只能称量三次,该怎么称量能确定这个质量不一样的小球? 说明:面试的时候,碰到了这么个智力题,总共十道题,半个小时 ...
<fmt:formatNumber value="12" type="currency" pattern="$.00"/> -- $12.00 <fmt:formatNumber value="12" type="currency" pattern="$.0#"/> -- $12.0 <fmt:formatNumber value="1234567890" type="currency"/> - ...
请参见附件
今天修改错误有一个特别大的发现: 在ApplicationContext-service.xml中配置<bean>属性id的值 ,我一直认为:id的值 必须与Acion里的成员变量的Service的值是一样的,但今天我发现我错了,bean id的值应该是与action中set方法的方法名是一至的,而且set不区分bean id 大首字母大小写。我以前一直认为是和action中的service名有关系,或和set方法参数名有关系,今天测试了,只和action中set方法方法名有关系。
Global site tag (gtag.js) - Google Analytics