Java软件工程师面试题
发布时间:2024-12-26 10:12:45浏览次数:26姓名: 面试日期与时间: 年 月 日 : 为了更全面地了解你的专业能力,请你尽力回答以下问题,谢谢合作!1. SQLSERVER 有 numeric 类型自动序列递增,请简述一下 ORACLE 中是如何实现序列自动自增功能的。2. 写出 ORACLE 中的日期函数。3. 简述一下 STRUCTS 的组成和处理过程。4. What will be the output when you compile and execute the following program.public class Base{private void test() {int i = 1;switch (i) { case 0: System.out.println("zero"); break; case 1: System.out.println("one"); case 2: System.out.println("two"); default: System.out.println("default"); }}static public void main(String[] a) {new Base().test();} }Select most appropriate answer.a) one b) one, defaultc) one, two, default d) defaulte) Compilation Error. switch cannot take an int as an argument5. For what value of i, the following program will output "Less than 20"public class Base{private void test() {int i ;if(i < 10)System.out.println("Less than 10");elseif ( i < 20) System.out.println("Less than 20");elseSystem.out.println("Not less than 10");}static public void main(String[] a) {new Base().test();} }第 1 页, 共 页Select all appropriate answers.a) 0 b) 10 c) 11 d) 19.999; e) (int)19.99 f) None6. For what value of i, the following program will output "Not Greater than 10" public class Base{private void test() {int i ;
if(i > 10)System.out.println("Greater than 10");elseif ( i < 10) System.out.println("Less than 10");elseif ( i > 20) System.out.println("Greater than 20");elseSystem.out.println("Not Greater than 10");}static public void main(String[] a) {new Base().test();} }Select most appropriate answer.a) 0 b) 10 c) 11 d) 100 e) None7. The method test() throws an IOException. How do you specify that ?import java.io.*;import java.net.*;public class Base{private void test() {String a = null;if(a == null)//throws IOException}}Select all valid answers a) private void test() throw IOExceptionb) private void test() throw new IOException("")c) private void test() throws IOException()d) private void test() throws IOExceptione) private void test() raise IOException答题区:答题人签名: 日期:20 年 月 日 第 2 页, 共 页答题区:答题人签名: 日期:20 年 月 日 第 页, 共 页答案:1. 通过设置序列2. Datetime timestamp3. MVC model view contro4. b5. c d6. b7. d