这些都是本人在前段时间碰到过的题目。
大多是没有答案的,大家自己找下。
有些题目描述得不清楚的话,请大家见谅!!!
浙江万朋笔试:
1.Jvm类加载原理 Tomcat 类加载原理
2.Servlet的创建过程  request response session的生命周期
3.描述一下session 跟cookie session跟cookie的适用范围 session的工作原理
4.单例模式
5.set list map存取数据有什么区别
6.Spring中把service层跟dao层的bean都定义在一个配置文件中有什么隐患1、描述客户端浏览器与web服务器的交互过程,说明Servlet的生命周期,回答request、response、session的生命周期。
2、List,Set,Map存取元素的特点
3、String和StringBuffer在连接字符串时候的区别
4、简单描述一下MVC框架的设计思想,并列举当前流行的mvc框架和你熟悉的mvc框架
5、解释什么叫做IOC,可以用spring ioc 作为例子。
6、JVM加载class文件的运行机制,和tomcat的类加载顺序
7、cookie和session的应用范围和cookie的生命周期
8、JSP中forward和redirect的区别----------------------------------------------------------------------------------------------------------------------北京广通信达:
1、假设一个类的代码如下:
package com.test;
public class Test {
}
在dos窗口下,如何编译这个类
2、如何将iso-8859-1编码字符串转换成gb2312编码字符串
String newStr = new String(old.getBytes("ISO8859-1"), "GB2312");
3、List、Set、Map的实现类都有哪些
4、page、request、session、application的联系和区别
5、Swing窗口,按钮上的字为“请按我”,按下后,弹出一段话:“谁按下我?”;
6、Exception和RuntimeException的区别----------------------------------------------------------------------------------------------------------------------支付宝面试:
1、排序算法:冒泡
2、Oracle:锁有几种
3、hibernate如何处理并发
4、描述一下什么是spring的 IOC DI AOP
5、struts1 struts2的区别
6、说说你对垃圾回收的看法,如何强制垃圾回收
7、你了解多少垃圾回收算法
8、你对TCP/IP协议了解多少淘宝9月校招笔试题:
1. 如何对ArrayList中的元素进行排序?
使用Collections的sort方法
sort(List<T> list) 
          根据元素的自然顺序 对指定列表按升序进行排序。 
static <T> void sort(List<T> list, Comparator<? super T> c) 
          根据指定比较器产生的顺序对指定列表进行排序。
杭州百富电力:
1.protected、private、public、不写时的区别
2.&与&&的区别
3.2乘以8的最高效写法
4.throws、throw、try、catch、finally表示的含义
5.使用Java socket编程,从服务器中读出几个字符,并显示出来
6.UNIX/LINUX的分析磁盘剩余空间命令为?并描述其输出结果。
7.LINUX查看主机CUP、内存、IP的命令
8.进程管理、主机查看命令。
9、查询出每门课都在80分以上的人的名字;
张三                 语文                         83
张三                 数学                         80
张三                 英语                         88
李四                 语文                         73
李四                 数学                         80
李四                 英语                         88
王五                 语文                         83
王五                 数学                         60
聚光科技笔试:
一、填空题
1、十进制数170.75转换成十六进制表示是                                        
2、请写出下面java程序的执行结果
   public class TestException {
public void f1() throws Exception {
throw new Exception("f1 exception");
}
public static void main(String[] args) {
TestException te = new TestException();
try {
try {
te.f1();
} finally {
}
throw new Exception("main exception");
} catch (Exception ex) {
System.out.println(ex.getMessage());
}
}
}
输出结果:                                                              3、下面的html代码完成鼠标移入div块时的提示功能,填空完成程序
<html>
  <head>
<script type="text/javascript">
function getTipDiv() {
return document.                        ("divTip1");
}
function showTip(oEvent) {
var oDiv = getTipDiv();
oDiv.style.visibility = "visible";
oDiv.style.left = oEvnet.clientX + 5;
oDiv.style.top = oEvent.clientY + 5;
}
function hideTip(oEvent) {
var oDiv = getTipDiv();
oDiv.style.visibility = "                     ";
}
</script>
  </head>
  <body>
<div id="div1" 
 style="background-color: red; height: 50px; width: 50px"
 onmouseover="showTip(event)"
                        ="hideTip(event)"></div>
<div id="divTip1"
 style="background-color:yellow; position:absolute; visibility:hidden; padding:5px">
<span style="font-weight: bold">Custom Tooltip</span><br/>
</div>
  </body>
</html>4、阅读下面java语言程序,
int f(int n) {
int total = 0;
int temp = 1;
int i;
for (i=1; i<=n; i++) {
temp *= i;
total += temp;
}
return total;
}则此函数的数学表达式是f(n)=                                    5、阅读下面java语言程序
public class A {
protected int i = 3;
protected int j = 3;
public void incI() { i++; }
public void incJ() { j++; }
}
public class B extends A {
protected int i = 40;
public void incI() { i += 30; }
public void incJ() { j += 30; }
public static void main(String[] args) {
A a = new B();
a.incI();
a.incJ();
System.out.println(a.i + ", " + a.j); // 40 33?
}
}
执行B的main方法,输出的结果是:                                                6、类Semaphore实现了信号量的功能,填空完成此类
public class Semaphore {
private int count;
public Semaphore(int count) {
          .count = count;
}
public            void acquire() {
while (count == 0) {
try {
wait();
} catch (InterruptedException e) {
}
}
count--;
}
public synchronized void release() {
count++;
                ;//alert a thread that's blocking on this semaphore
}
}7、函数boolean match(int[] a, int len, int sum) 功能是判断长度为len的整数数组a中是否存在若干个整数其和正好是sum,如果存在返回true,否则返回false,请填空完成这个函数。
boolean match(int[] a, int len, int sum) {
if ((a == null) || (len <= 0) || (a.length < len)) {
return false;
}
//递归出口
if (len == 1) {
return a[0] == sum;
}
//数组长度减1,递归判断
return match(a, len-1, sum) || match(a, len-1,            ) || (a[len-1]==           );
}8、名词解释:
(1)LoadRnner:                                                              
(2)GPL:                                                                     
(3)Spring:                                                                  
(4)SAAS:                                                                    
(5)ActionScript:                                                           9、整数1-30中,任意取出n个不同的数,必有2个数之差为12,则n的最小值是        二、程序设计题:
1、一块长方形边长为a1,a2,另一块长方形边长为b1,b2,函数boolean canCover(float a1, float a2, float b1, float b2)判断是否有一块长方形可以完全覆盖另一块长方形,请实现此函数。
2、整数数组X有m个元素,x[0],x[1],...x[m-1],整数数组Y有n个元素,y[0],y[1],...y[n+1],若数组X和数组Y合并后正好是m+n个连续的整数,我们称X和Y互补,编写函数判断X和Y是否互补,若是则返回true,否则返回false。
Boolean isComplementary(int[] x, int m, int[] y, int n)
3、考虑一种权限系统,包括部门、人员、功能三种模型。部门是一种树状结构,即一个部门可以有若干个子部门,一个人员只能在一个部门下。功能可以分配给部门和人员。人员或者其所属的部门有某功能权限,我们就说此人员拥有此功能权限。请定义此权限模型中用到的数据库表,并定义部门、人员、功能3个对应类,类中需要包括重要属性及函数,并在人员类中实现是否拥有某个功能的权限的函数。请在代码中加适当注释。
搜狐畅游校招:
1、 HTML发送邮件:
HTML代码<a href="mailto:[email protected]"></a>
点一下这个链接会弹出outlook来给[email protected]这个邮箱发邮件.
2、 HTML标签<a>属性target的作用:

解决方案 »

  1.   


    聚光科技笔试:
    一、填空题
    1、十进制数170.75转换成十六进制表示是                                        
    2、请写出下面java程序的执行结果
       public class TestException {
    public void f1() throws Exception {
    throw new Exception("f1 exception");
    }
    public static void main(String[] args) {
    TestException te = new TestException();
    try {
    try {
    te.f1();
    } finally {
    }
    throw new Exception("main exception");
    } catch (Exception ex) {
    System.out.println(ex.getMessage());
    }
    }
    }
    输出结果:                                                              3、下面的html代码完成鼠标移入div块时的提示功能,填空完成程序
    <html>
      <head>
    <script type="text/javascript">
    function getTipDiv() {
    return document.                        ("divTip1");
    }
    function showTip(oEvent) {
    var oDiv = getTipDiv();
    oDiv.style.visibility = "visible";
    oDiv.style.left = oEvnet.clientX + 5;
    oDiv.style.top = oEvent.clientY + 5;
    }
    function hideTip(oEvent) {
    var oDiv = getTipDiv();
    oDiv.style.visibility = "                     ";
    }
    </script>
      </head>
      <body>
    <div id="div1" 
     style="background-color: red; height: 50px; width: 50px"
     onmouseover="showTip(event)"
                            ="hideTip(event)"></div>
    <div id="divTip1"
     style="background-color:yellow; position:absolute; visibility:hidden; padding:5px">
    <span style="font-weight: bold">Custom Tooltip</span><br/>
    </div>
      </body>
    </html>4、阅读下面java语言程序,
    int f(int n) {
    int total = 0;
    int temp = 1;
    int i;
    for (i=1; i<=n; i++) {
    temp *= i;
    total += temp;
    }
    return total;
    }则此函数的数学表达式是f(n)=                                    5、阅读下面java语言程序
    public class A {
    protected int i = 3;
    protected int j = 3;
    public void incI() { i++; }
    public void incJ() { j++; }
    }
    public class B extends A {
    protected int i = 40;
    public void incI() { i += 30; }
    public void incJ() { j += 30; }
    public static void main(String[] args) {
    A a = new B();
    a.incI();
    a.incJ();
    System.out.println(a.i + ", " + a.j); // 40 33?
    }
    }
    执行B的main方法,输出的结果是:                                                6、类Semaphore实现了信号量的功能,填空完成此类
    public class Semaphore {
    private int count;
    public Semaphore(int count) {
              .count = count;
    }
    public            void acquire() {
    while (count == 0) {
    try {
    wait();
    } catch (InterruptedException e) {
    }
    }
    count--;
    }
    public synchronized void release() {
    count++;
                    ;//alert a thread that's blocking on this semaphore
    }
    }7、函数boolean match(int[] a, int len, int sum) 功能是判断长度为len的整数数组a中是否存在若干个整数其和正好是sum,如果存在返回true,否则返回false,请填空完成这个函数。
    boolean match(int[] a, int len, int sum) {
    if ((a == null) || (len <= 0) || (a.length < len)) {
    return false;
    }
    //递归出口
    if (len == 1) {
    return a[0] == sum;
    }
    //数组长度减1,递归判断
    return match(a, len-1, sum) || match(a, len-1,            ) || (a[len-1]==           );
    }8、名词解释:
    (1)LoadRnner:                                                              
    (2)GPL:                                                                     
    (3)Spring:                                                                  
    (4)SAAS:                                                                    
    (5)ActionScript:                                                           9、整数1-30中,任意取出n个不同的数,必有2个数之差为12,则n的最小值是        
      

  2.   

    下划线还是无法显示
    再试一次聚光科技笔试:
    一、填空题
    1、十进制数170.75转换成十六进制表示是 
    2、请写出下面java程序的执行结果
       public class TestException {
        public void f1() throws Exception {
            throw new Exception("f1 exception");
        }
        public static void main(String[] args) {
            TestException te = new TestException();
            try {
                try {
                    te.f1();
                } finally {
                }
                throw new Exception("main exception");
            } catch (Exception ex) {
                System.out.println(ex.getMessage());
            }
        }
    }
    输出结果:                                  3、下面的html代码完成鼠标移入div块时的提示功能,填空完成程序
    <html>
      <head>
        <script type="text/javascript">
            function getTipDiv() {
                return document.("divTip1");
            }
            function showTip(oEvent) {
                var oDiv = getTipDiv();
                oDiv.style.visibility = "visible";
                oDiv.style.left = oEvnet.clientX + 5;
                oDiv.style.top = oEvent.clientY + 5;
            }
            function hideTip(oEvent) {
                var oDiv = getTipDiv();
                oDiv.style.visibility = "";
            }
        </script>
      </head>
      <body>
        <div id="div1" 
             style="background-color: red; height: 50px; width: 50px"
             onmouseover="showTip(event)"
                      ="hideTip(event)"></div>
        <div id="divTip1"
             style="background-color:yellow; position:absolute; visibility:hidden; padding:5px">
            <span style="font-weight: bold">Custom Tooltip</span><br/>
        </div>
      </body>
    </html>4、阅读下面java语言程序,
    int f(int n) {
            int total = 0;
            int temp = 1;
            int i;
            for (i=1; i<=n; i++) {
                temp *= i;
                total += temp;
            }
            return total;
        }则此函数的数学表达式是f(n)=                5、阅读下面java语言程序
    public class A {
        protected int i = 3;
        protected int j = 3;
        public void incI() { i++; }
        public void incJ() { j++; }
    }
    public class B extends A {
        protected int i = 40;
        public void incI() { i += 30; }
        public void incJ() { j += 30; }
        public static void main(String[] args) {
            A a = new B();
            a.incI();
            a.incJ();
            System.out.println(a.i + ", " + a.j); 
        }
    }
    执行B的main方法,输出的结果是:                                6、类Semaphore实现了信号量的功能,填空完成此类
    public class Semaphore {
        private int count;
        public Semaphore(int count) {
             .count = count;
        }
        public    void acquire() {
            while (count == 0) {
                try {
                    wait();
                } catch (InterruptedException e) {
                }
            }
            count--;
        }
        public synchronized void release() {
            count++;
              ;//alert a thread that's blocking on this semaphore
        }
    }7、函数boolean match(int[] a, int len, int sum) 功能是判断长度为len的整数数组a中是否存在若干个整数其和正好是sum,如果存在返回true,否则返回false,请填空完成这个函数。
    boolean match(int[] a, int len, int sum) {
            if ((a == null) || (len <= 0) || (a.length < len)) {
                return false;
            }
            //递归出口
            if (len == 1) {
                return a[0] == sum;
            }
            //数组长度减1,递归判断
            return match(a, len-1, sum) || match(a, len-1,) || (a[len-1]==  );
        }8、名词解释:
    (1)LoadRnner:                                 
    (2)GPL:                                   
    (3)Spring:                            
    (4)SAAS:                         
    (5)ActionScript:                          9、整数1-30中,任意取出n个不同的数,必有2个数之差为12,则n的最小值是 
      

  3.   

    public class TestException { 
        public void f1() throws Exception { 
            throw new Exception("f1 exception"); 
        } 
        public static void main(String[] args) { 
            TestException te = new TestException(); 
            try { 
                try { 
                    te.f1(); 
                } finally { 
                } 
                throw new Exception("main exception"); 
            } catch (Exception ex) { 
                System.out.println(ex.getMessage()); 
            } 
        } 

    输出结果:这个的答案也许是main exception
      

  4.   


    阅读下面java语言程序, 
    int f(int n) { 
            int total = 0; 
            int temp = 1; 
            int i; 
            for (i=1; i <=n; i++) { 
                temp *= i; 
                total += temp; 
            } 
            return total; 
        } 答案f(n)=1!+2!+3!+......n!
      

  5.   

    5、阅读下面java语言程序
    public class A {
        protected int i = 3;
        protected int j = 3;
        public void incI() { i++; }
        public void incJ() { j++; }
    }
    public class B extends A {
        protected int i = 40;
        public void incI() { i += 30; }
        public void incJ() { j += 30; }
        public static void main(String[] args) {
            A a = new B();
            a.incI();
            a.incJ();
            System.out.println(a.i + ", " + a.j); // 40 33?
        }
    }
    这题不明白,跑出来是3,33,望高手解答
      

  6.   

    其实的你基本上都想对了
    但是有点想错了
     a.incI();时候,确实是调用的B的 incI();此时B中的i也确实变成了70
    但是最后打印a.i的时候这个时候是调用的A中的i,因为a是A的引用,他只能看到A中的变量和方法。。
      

  7.   

    整数数组X有m个元素,x[0],x[1],...x[m-1],整数数组Y有n个元素,y[0],y[1],...y[n+1],若数组X和数组Y合并后正好是m+n个连续的整数,我们称X和Y互补,编写函数判断X和Y是否互补,若是则返回true,否则返回false。 
    Boolean isComplementary(int[] x, int m, int[] y, int n) public class B {
    public static void main(String[] args) {
    int[] x = {1,5,9};
    int[] y = {0,2,3,4,6,8,5};
    System.out.println(isComplementary(x, x.length, y, y.length));
    }
    static boolean isComplementary(int[] x, int m, int[] y, int n) {
    int i = 0;
    int[] sum = new int[m+n];
    for(int j=0; j<m; j++) {
    sum[i] = x[j];
    i++;
    }
    for(int k=0; k<n; k++) {
    sum[i] = y[k];
    i++;
    }
    for(int q=0; q<sum.length; q++) {
    System.out.println(sum[q]);
    }
    bubbleSort(sum);
    boolean flag = true;
    for(int a=0; a<sum.length-1; a++){
    if(sum[a+1] != sum[a] + 1)
    flag = false;
    }
    if(flag)
    return true;
    else
    return false;
    }
    //冒泡排序法排序
    static void bubbleSort(int[] array) {
    for(int i=0; i<array.length; i++) {
    for(int j=0; j<array.length-i-1; j++) {
    if(array[j+1] < array[j]) {
    int t = array[j];
    array[j] = array[j+1];
    array[j+1] = t;
    }
    }
    }
    }
    }
      

  8.   

    顶LZ一个,该不会都是LZ亲身经历的吧