1.RuntimeException Exception中有一个特殊的子类异常RuntimeException执行时异常. 假设在函数内容抛出该异常,函数上能够不用声明.编译一样通过. 假设在函数上声明了该异常,调用者能够不用进行处理.编译一样通过. 之所以不用在函数上声明,是由于不须要让调用者处理. 当该异常发生,希望程序停止. 由于在执行时,出现了无法继续运算的情况, 希望停止程序后.对代码进行修正. 例: class Person { public void checkName(Strin
java.lang.UnsupportedClassVersionError: Bad version number in .class file异常 部署工程时也出现过因为版本不同引起的问题,那时我们用的IDE的编译器是JDK5.0,而那台Linux装的是JDK6.0,部署后发现很多功能都出错,看来有些东西还是得注意一下啊.在myEclipse中改变编译器的方法:Project->Properties->JavaCompiler->Configure Workspace Setting
同样的错误,不可再犯第三次!!! 数据库中是char,里面带空格,但在pl/sql中这样写可以查出来.如下: select ipostid from product t where ipostid= '212' 但在java中,如果是用jdbc的prepareStatement,这个执行sql就查不出数据来,需要: select ipostid from pb_product where trim(ipostid)=? 查看oracle 用户执行的sql语句历史记录 下面的,没试过,也不知道好不
继承标识:Java使用extends/implement,C++使用: super:调用父类的某些东西 instanceof:RTTI机制(A is instanceif B) final:类似于C++中的const,static 区别001:extends and implement implement-->描述的是Class与Interface的关系 extends-->描述的是Class与Class的关系 区别002:abstract class and interface (1)抽象类
对于一组数据,主要支持两种动作: union isConnected public interface UF { int getSize(); boolean isConnected(int p,int q); void unionElements(int p,int q); } public class UnionFind1 implements UF{ private int[] id; public UnionFind1(int size){ id=new int[size]; for (
import java.util.Vector; public class ElementCheck { // 重复优先 static Vector<Integer> CheckSameElement1(Vector<String> test) { Vector<Integer> markA = new Vector(); Vector<Integer> markB = new Vector(); for (int i = 0; i < test.si