public class Person { } public class Student extends Person{ private String name; public Student(String name) { this.name = name; } public Student() { } public String getName() { return name; } public void setName(String name) { this.name = name; } @
之前阅读<Head First Java>的时候,记得里面有提到过,Java在调用方法,传递参数的时候,采用的是pass-by-copy的方法,传递一份内容的拷贝,即传值.举一个最简单的例子: public class Test { public static void main(String[] args) { int numberA = 1; int numberB = 2; swap(numberA, numberB); System.out.println(numberA); Syst
Java调用第三方dll文件的使用方法 public class OtherAdapter { static { //System.loadLibrary("Connector");//载入需要调用的dll Connector.dll System.load("d://Connector.dll");//载入dll Connector.dll } //用native关键字修饰将被其它语言实现的方法 //dll文件中对应的函数声明 public native stat
1.用户类 package com.lf.entity; import com.lf.annotation.SetProperty; import com.lf.annotation.SetTable; public class UserEntity { private String userName; private int userAge; private final int money = 10000; public String getUserName() { return userNa