转来的
Java基础方面:  1、作用域public,protected,private,以及不写时的区别  2、ArrayList和Vector的区别,HashMap和Hashtable的区别  3、char型变量能不能定义为一个中文?为什么?  4、多线程有几种表示方法,都是什么?同步有几种实现方法,都是什么?  5、继承时候类的执行顺序问题,一般都是选择题,问你将会打印出什么?  6、内部类的实现方式?  7、垃圾回收机制,如何优化程序?  8、float型float f=3.4是否正确?  Jsp方面  1、jsp有哪些内置对象?作用分别是什么?  2、jsp有哪些动作?作用分别是什么?  3、include的两种实现方式的区别?  4、两种跳转方式分别是什么?有什么区别?  Servlet方面  1、说一说Servlet的生命周期?  2、Servlet版本间(忘了问的是哪两个版本了)的不同?
Jdbc、Jdo方面  1、可能会让你写一段Jdbc连Oracle的程序.  2、Class.forName的作用?为什么要用?  3、Jdo是什么?  Xml方面  1、xml有哪些解析技术?区别是什么?  2、你在项目中用到了xml技术的哪些方面?如何实现的?  3、用jdom解析xml文件时如何解决中文问题?如何解析?  EJB方面  1、EJB2.0有哪些内容?分别用在什么场合? EJB2.0和EJB1.1的区别?  MVC方面  1、MVC的各个部分都有那些技术来实现?如何实现?  设计模式方面  1、开发中都用到了那些设计模式?用在什么场合?  JavaScript方面  1、如何校验数字型?  CORBA  1、CORBA是什么?用途是什么? 

解决方案 »

  1.   

    Java
    1. What is the new feature in Java 2 security? (select one) B
    A. Protection domain
    B. Access Control List
    C. Digital Signature
    D. Message Digests2. Normal lifecycle of a java application are
    1. Problem Statement 
    2. OO Design 
    3. Implementation
    4. Java app architecture 
    5. OO analysis
    In what order? (select two) E B
    A. 12345 
    B. 45213 
    C. 51423 
    D. 15423 
    E. 152433. What is EJB’s primary purpose? (select one) C
    A. Middleware independence
    B. Platform independence
    C. Language independence
    D. Allow user to build middleware4. What does a good software architect increase? (Choose the best answer) A
    A. Robustness
    B. Scalability
    C. Complexity
    D. maintenance5. When should you use synchronous communication between Java architecture layers? A
    A. When the client needs to wait for a response
    B. When the client doesn’t need to wait for a response 
    C. When the network is not available6. With respect to servlet, which of the following is/are false? D
    A. Servlet cannot access other Java objects on the server in which it resides
    B. Servlet resides in the client
    C. Servlet is multithreaded by default 
    D. Servlet is a request/response mechanism7. A entity EJBObject class of an EJB implements  B
    A. SessionBean
    B. EntityBean
    C. EJBHome
    D. EJBObject8. You have successfully implemented a J2EE solution for a client. The client has become concerned that it’s database may be vulnerable to malicious attack (hacking) . What do you suggest as a solution? (Select the best solution) C
    A. Tell him you have tested the code and see no way in which access can be compromised.
    B. Suggest creating a DMZ for the Web and Application Servers
    C. Suggest creating a DBZ for the DB Server
    D. Suggest a secure solution is possible by switching to SSL and issuing X500 certificates to each client.9. Your J2EE solution that you implemented has been a huge success. The number of customers is almost 5 times what has been anticipated and performance is becoming an issue. (select the best two)  B D
    A. Add more RAM to the 4 processor 4GB RAM AppServer
    B. Add another AppServer set the webconnector to round-robin
    C. Add a second network (LAN) card to the web server
    D. Upgrade the database hardware10. Look at the diagram below, what is true A
         funcA()
    funB()A. funcA() is invoked by ObjA
    B. funB() is a method of ObjB
    C. funcB() returns type ObjC11. Look at the diagram below, what is true  B
    A. classA is a type of classC
    B. classA is a singleton
    C. classB is a type of classA
    D. classC is accessed by classA12. Which two types explicitly support writing programs for international audiences?  (choose 2) C D
    A. int primitive type
    B. char primitive type
    C. java.lang.String class
    D. java.lang.Integer class
      

  2.   

    Oracle 8i
    1. You issue the SQL*Plus command SPOOL ON. Which task is accomplished? C
    A. The next screen output from the SQL*Plus session is saved into a file named afiedt.buf.
    B. The next screen output from the SQL*Plus session is saved into a file named ON.lst
    C. The next screen output from the SQL*Plus session is sent to a printer.
    D. Nothing happens, a file name is missing from the command.2. I want to update table TAB1 using a select clause like below:  A
    update TAB1 set (col1,col2)=(select col1,col2 from tab2 where col1=’abc’)
    where col2=’def’
    I execute this SQL clause but failed, the reason is:
    A. Grammar error.
    B. Select clause returned no rows
    C. Select clause returned more than one row.
    D. Select clause returned only one row.3. What is the advantage of using the %TYPE attribute to declare a PL/SQL type? C
    A. The name of an unused column in the underlying table may change.
    B. The data types or data type sizes of the underlying table columns may change by runtime.
    C. The %TYPE attribute forces the data type of the underlying database table column to be what you specify. 
    D. All column constraints are applied to the variables declared using %TYPE.4. The PL/SQL executable section contains which type of statements? A
    A. PL/SQL and SQL statements to manipulate data in the database 
    B. The procedure or function name and input/output variable definitions 
    C. The definition of program variables, constants, exceptions, and cursors 
    D. Statements to deal with error handling5. Which three are true regarding the use of outer joins? (Choose three) BCE
    A. You cannot use IN operator in a condition that involves an outerjoin.
    B. You use (+) on both sides of the WHERE condition to perform an outerjoin. 
    C. You use (*) on both sides of the WHERE condition to perform an outerjoin. 
    D. You use an outerjoin to see only the rows that do not meet the join condition. 
    E. In the WHERE condition, you use (+) following the name of the column in the table without matching rows, to perform an outerjoin. 
    F. You cannot link a condition that is involved in an outerjoin to another condition by using the OR operator.
    6. Examine the data in the EMPLOYEES table: CDE
     LAST_NAME              DEPARTMENT_ID                SALARY
    Getz                           10 3000
    Davis                          20 1500
    King                           20 2200
    Davis                          30 5000
     
    Which three subqueries work? (Choose three)
    A. SELECT * FROM employees where salary > (SELECT MIN(salary) FROM employees GROUP BY department.id); 
    B. SELECT * FROM employees WHERE salary = (SELECT AVG(salary) FROM employees GROUP BY department_id); 
    C. SELECT distinct department_id FROM employees Where salary > ANY (SELECT AVG(salary) FROM employees GROUP BY department_id); 
    D. SELECT department_id FROM employees WHERE SALARY > ALL (SELECT AVG(salary) FROM employees GROUP BY department_id); 
    E. SELECT last_name FROM employees Where salary > ANY (SELECT MAX(salary) FROM employees GROUP BY department_id); 
    F. SELECT department_id FROM employees WHERE salary > ALL (SELECT AVG(salary) FROM employees GROUP BY AVG(SALARY));7. Evaluate the following Oracle SQL statement: E
    SELECT a.emp_name, a.sal, a.dept_id, b.maxsal
    FROM employees a,
              (SELECT dept_id, MAX(sal) maxsal
               FROM employees
               GROUP BY dept_id) b
    WHERE a.dept_id = b.dept_id
    AND a.sal < b.maxsal;What is the result of the statement?
    A. The statement produces an error at line 1. 
    B. The statement produces an error at line 3.
    C. The statement produces an error at line 6.
    D. The statement returns the employee name, salary, department ID, and maximum salary earned in the department of the employee for all departments that pay less salary then the maximum salary paid in the company. 
    E. The statement returns the employee name, salary, department ID, and maximum salary earned in the department of the employee for all employees who earn less than the maximum salary in their department.
      

  3.   

    8. You want to display the titles of books that meet these criteria:  D
    1. Purchased before January 21, 2001
    2. Price is less then $500 or greater than $900 
    You want to sort the results by their data of purchase, starting with the most recently bought book.Which statement should you use?
    A. SELECT book_title FROM books WHERE price between 500 and 900 AND purchase_date < '21-JAN-2001' ORDER BY purchase_date; 
    B. SELECT book_title FROM books WHERE price IN (500,900) AND purchase_date < '21-JAN-2001' ORDER BY purchase date ASC; 
    C. SELECT book_title FROM books WHERE price < 500 or > 900 AND purchase_date < '21-JAN-2001' ORDER BY purchase date DESC; 
    D. SELECT book_title FROM books WHERE (price < 500 OR price > 900) AND purchase_date < '21-JAN-2001' ORDER BY purchase date DESC;9. CREATE TABLE orders 
    (SER_NO NUMBER UNIQUE, 
    ORDER_ID NUMBER, 
    ORDER_DATE DATE NOT NULL
    STATUS VARCHARD2(10) 
    CHECK (status IN (‘CREDIT’,’CASH’)), PROD_ID_NUMBER REFERENCES PRODUCTS(PRODUCT_ID), ORD_TOTAL NUMBER, PRIMARY KEY (order id, order date));
    DF
    For which columns would an index be automatically created when you execute the above SQL statement? (Choose two)
    A. SER_NO
    B. ORDER_ID
    C. STATUS
    D. PROD_ID
    E. ORD_TOTAL
    F. Composite index on ORDER_ID and ORDER_DATE10. Examine the description of the STUDENTS table:
    STD_ID     NUMBER(4)
    COURSE_ID    VARCHARD2(10)
    START_DATE      DATE
    END_DATE   DATEWhich two aggregate functions are valid on the START_DATE column? (Choose two) CE
    A.  SUM(start_date)
    B.  AVG(start_date)
    C.  COUNT(start_date)
    D.  AVG(start_date, end_date)
    E.  MIN(start_date)
    F.  MAXIMUM(start_date)11. For which two constraints does the Oracle Server implicitly create a unique index? BE
    (Choose two.)
    A. NOT NULL
    B. PRIMARY KEY
    C. FOREIGN KEY
    D. CHECK
    E. UNIQUE
    12. Examine the structure of the EMPLOYEES, DEPARTMENTS, and LOCATIONS
    tables.
    EMPLOYEES
    EMPLOYEE_ID  NUMBER  NOT NULL, Primary Key
    EMP_NAME  VARCHAR2 (30)
    JOB_ID VARCHAR2 (20)
    SALARY   NUMBER
    MGR_ID  NUMBER  References EMPLOYEE_ID column
    DEPARTMENT_ID  NUMBER  Foreign key to DEPARTMENT_ID column of the
    DEPARTMENTS table
    DEPARTMENTS
    DEPARTMENT_ID NUMBER NOT NULL, Primary Key
    DEPARTMENT_NAME  VARCHAR2(30)
    MGR_ID  NUMBER  References NGR_ID column of the
    EMPLOYEES table
    LOCATION_ID NUMBER  Foreign key to LOCATION_ID column of the
    LOCATIONS table
    LOCATIONS
    LOCATION_ID  NUMBER  NOT NULL, Primary Key
    CITY  VARCHAR2 (30)Which two SQL statements produce the name, department name, and the city of all the
    employees who earn more then 10000? (Choose two) BD
    A.  SELECT emp_name, department_name, city 
    FROM employees e
    JOIN departments d
    USING (department_id)
    JOIN locations 1
    USING (location_id)
    WHERE salary > 10000;
    B.  SELECT emp_name, department_name, city
    FROM employees e, departments d, locations 1
    JOIN ON (e.department_id = d.department id)
    AND (d.location_id =1.location_id)
    AND salary > 10000;
    C.  SELECT emp_name, department_name, city
    FROM employees e, departments d, locations 1
    WHERE salary > 10000;
    D.  SELECT emp_name, department_name, city
    FROM employees e, departments d, locations 1
    WHERE e.department_id = d.department_id
    AND d.location_id = 1.location_id
    AND salary > 10000;
    E.  SELECT emp_name, department_name, city
    FROM employees e
    NATURAL JOIN departments, locations
    WHERE salary > 10000;
    13. Which two statements about sequences are true? (Choose two) CD
    A.  You use a NEXTVAL pseudo column to look at the next possible value that would be
    generated from a sequence, without actually retrieving the value.
    B. You use a CURRVAL pseudo column to look at the current value just generated from
    a sequence, without affecting the further values to be generated from the sequence.
    C. You use a NEXTVAL pseudo column to obtain the next possible value from a
    sequence by actually retrieving the value from the sequence.
    D.  You use a CURRVAL pseudo column to generate a value from a sequence that would
    be used for a specified database column.
    E.  If a sequence starting from a value 100 and incremented by 1 is used by more then one
    application, then all of these applications could have a value of 105 assigned to their
    column whose value is being generated by the sequence.
    F.  You use REUSE clause when creating a sequence to restart the sequence once it
    generates the maximum value defined for the sequence.14. Which three statements correctly describe the functions and use of constraints? (Choose
    three.) A D F
    A.  Constraints provide data independence. 
    B.  Constraints make complex queries easy.
    C.  Constraints enforce rules at the view level.
    D.  Constraints enforce rules at the table level.
    E.  Constraints prevent the deletion of a table if there are dependencies.
    F.  Constraints prevent the deletion of an index if there are dependencies.
      

  4.   

    15. I am the principal of a school, and I have a lot of classes with the table as follows:
    --------------------------------------------------------------------------------------
    Table name: schools
    Column: class varchar2 (20)
    Name varchar2 (40)
    Sex varchar2 (1) M – male, F – female
     --------------------------------------------------------------------------------------
    Please use one SQL statement to show me which class has the same number of male and female.select * from schools where (select count(sex) as t1 from schools where sex='f')=(select count(sex) as t1 from schools where sex='m')
     16. I have the following table that contains all my students in my class.
    --------------------------------------------------------------------------------------
    Table name: Students
    Column:  Name Varchar2 (40)
    Score Number (5,2)
     -------------------------------------------------------------------------------------
    I want to give scholarship to those on top 3 scores (not top 3 persons, as there may be 4 with 100 s, 3 with 99 s, 5 with 97 s, …etc)
    Please use one SQL statement to show me the name and score of the top 3 scores.select name,sum(score) as totalScore from students where rownum<=3 group by name
      

  5.   

    bon_jovi(西门疯雪) ( 
    你好,这些题目可有正确的答案??
    可否提供一下??
      

  6.   

    没有答案。
    我就自己理解解答几个。也非常希望大家能指正。
    Java基础方面:  1、作用域public,protected,private,以及不写时的区别
    不写的时候,是friend,在同一package下的class都可以访问。      2、ArrayList和Vector的区别,HashMap和Hashtable的区别
    Vector内部有同步机制,线程安全,开销大点。两者内部实现机制都是数组。HashMap和Hashtable主要区别也是同步。
      3、char型变量能不能定义为一个中文?为什么?
    java是unicode,应该可以。  4、多线程有几种表示方法,都是什么?同步有几种实现方法,都是什么?
    继承Thread或实现Runnable接口。同步方法就知道一种。
      7、垃圾回收机制,如何优化程序?
    不知道  8、float型float f=3.4是否正确?
    float f=3.4f
      

  7.   

    1 写一个连接池
    2 写一个多线程,一个线程监控其他线程
    3 手工构造一个简单frame,带panel,button,menu
    4 写个算法,证明某个链表回环
    5 递归查询
      

  8.   

    任何垃圾收集算法都必须做两件事情。首先,它必须检测出垃圾对象。
    其次,它必须回收垃圾对象所使用的堆空间并还给程序。两个基本的方法是引用计数和跟踪。火车算法。
    引用计数垃圾收集器通过为堆中的每一个对象保存一个计数来区分活动对象和垃圾对象。这个计数纪录下了对那个对象的引用次数。
    在跟踪中遇上的对象以某种方式打上标记,当结束跟踪时,没有打上标记的对象就判定是不可触及的,可以被当作垃圾对象。这是我在《深入JAVA虚拟机》里找出的一点回答。
      

  9.   

    4、多线程有几种表示方法,都是什么?同步有几种实现方法,都是什么?
    继承Thread或实现Runnable接口。同步方法就知道一种。
    --------------------
    同步可以有同步方法和同步块两种实现方式。此贴可以置顶!!
      

  10.   

    2、jsp有哪些动作?作用分别是什么?  3、include的两种实现方式的区别?
      Servlet方面  1、说一说Servlet的生命周期?
    这三个还不是很清楚,谁能简单说一下?
      

  11.   

    jsp动作:<jsp:useBean>实例化JavaBean,或者定位一个已经存在的Bean的实例,并把它赋给一个变量名或者id
    <jsp:setProperty>与上一个动作一起使用,来设置bean的属性值.
    <jsp:getProperty>相对于上一个动作,用来访问bean的属性.
    <jsp:include>动作的包含是动态的包含.指令包含是静态的包含.
    <jsp:forward>动作允许请求被向前传送到另外的JSP,Servlet或一个静态的资源.
    servlet的生命周期:
    1.实例化:web包容器创建Servlet实例
    2.初始化:包容器调用实例的init()方法
    3.服务:如果有请求传送到servlet,容器会调用servlet的service()方法
    4.消亡:在实例消亡前,包容器调用servlet实例的destroy()方法
    5.不可获得:实例被删除,并且标记为可被进行垃圾回收.