[经典]是java高手就进来,看一下你的水平,1.5%正确率
这道题是一个java公司的笔试题,考察了大概一千多个面试的java工程师以及项目经理,不过全对的只有不到1.5%
在做这个题的时候请按顺序做,不能改变顺序,做前面题时,不能查看后面的题,同上也不要查看下面的回复,不要改变你的答案
多的先不说,请把下面的题答案给出
class Human{
static int n=10;
public Human(){
age();
}
public void age(){
}
}
public class HumanAction extends Human{
private int n=20;
public void age(){
System.out.println("年龄是:"+n);
}
public static void main(String[] args){
new HumanAction();
}
}
输出什么?
-------------------------------------------------------
class Human{
public int n=10;
public Human(){
age();
}
public void age(){
}
}
public class HumanAction extends Human{
private int n=20;
public void age(){
System.out.println("年龄是:"+n);
}
public static void main(String[] args){
new HumanAction();
}
}
输出什么?
-------------------------------------------------------
class Human{
public static int n=10;
public Human(){
age();
}
public void age(){
}
}
public class HumanAction extends Human{
private static int n=20;
public void age(){
System.out.println("年龄是:"+n);
}
public static void main(String[] args){
new HumanAction();
}
}
输出什么?
-------------------------------------------------------
这是一个很基础的java继承关系与初始化的题,写出你的答案吧,看看你的水平
相关文档:
package testPackage;
class Test {
public static void main(String[] args) {
String hello = "Hello", lo = "lo";
System.out.print((hello == "Hello") + " ");
System.out.print((Other.hello == hello) + " ");
System.out.print((other.Other.hello == hello) + " ");
System.out.print((hello == ("Hel"+"lo ......
import java.util.Date;
class Dog{
private String name;
private Date birthday;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Date getBirthday() {
return b ......
1首先添加修改图片宽度和高度的方法
public static void reduceImg(String imgsrc, int widthdist, int heightdist) {
try {
File srcfile = new File(imgsrc);
if (!srcfile.exists()) {
return;
}
......
Java版支付宝接口开发
需求:调用支付宝接口的接口并集成到商城
调用支付宝接口所需要的“支付宝合作伙伴id”和“支付宝安全校验码”公司都给提供好了,支付宝官方那里也有该接口的“实物商品交易服务集成技术文档”及相关的DEMO源码。公司让我用JAVA来写,终于暂时不用再写JS了,嘿嘿&hel ......
来自:http://www.cnblogs.com/shiyangxt/archive/2008/07/30/1256813.html
环境:MyEclipse
数据库:mysql
首先新建Java项目,然后新建两个类,一个数据库连接池类,一个测试类。
分别命名ConnectionPool,ConnectionPoolTest。
然后新建一个配置文件,命名:dbpool.properties。
&n ......