面试题文档副本_第1页
面试题文档副本_第2页
面试题文档副本_第3页
面试题文档副本_第4页
面试题文档副本_第5页
已阅读5页,还剩11页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

一JAVA基础知识1、 下列语句那一个正确()A、 JAVA程序经编译后会产生machine codeB 、JAVA程序经编译后会产生byte codeC、 JAVA程序经编译后会产生DLLD、 以上都不对2、 下列说法正确的有()A、 class中的constructor不可省略B、 constructor必须与class同名,但方法不能与class同名C、 constructor在一个对象被new时执行D、 一个class只能定义一个constructor3、 提供java存取数据库能力的包是()A、 java.sqlB、 java.awtC、 java.langD、 java.swing4、 下列运算符合法的是()A、&BC.ifD. :=、题目有问题。5.执行如下程序代码X=0;c=0;do-c; a=a-1;while(a0 );后,C的值是()A.0B.1 C.-1D:死循环6、下面语句中正确的表达式为()A、byte b=128B、boolean n=nullC、double d=0.9239dD、float f=0.92397、将一个十六进制赋给一个long型变量的正确写法为()A、long number=345LB、long number=0345C、long number= 0345LD、long number=0x345L8、一下程序代码的输出是()Public class testpublic static oid main (String args)System.out.println(63);A.3B.5C.6 D.11题目有问题。9.一下成语的艾玛的输出是()Public class testPrivate static int j=0;Private static Boolean method(int K)J +=k;Return true;Public static void method(int i)boolean b;b = i10|method(4);b= i 10 | method(8);Public static void main(String args)method(0);System.out.println(j);A.0B.4C.8D.12E.不能编译通过10.一下程序代码执行后,哪个说法正确()int index=1;booleantest=new Boolean3; 不知道题目有没有抄错。boolean foo=testindex;A、 有异常抛出B、 无法编译C、 foo的值是0D、 foo的值是nullE、 foo的值是false二、JAVAScript基础知识1、在某一页面下载时,要自动显示出另一页面,可通过中使用下边的哪一事件来完成()Aonload BonunloadConclickDonchange2、下列javaScript语句中,()能实现单击一个按钮时弹出一个消息框A、B、C、D、3、在HTML页面中使用外部JavaSscript文件的正确语法是()A、B、C、D、4、网页编程中,运行下面的JavaScript代码:x=3; y=2; z=(x+2)/y; alert(z);则提示框中显示()A.2 B.2.5 C.32/2 D.165、在当前页面的同一目录下有一名为show.js的文件,下列代码可以正确访问该文件的是()A.B.C.D.题目有问题:6、要求用JavaScript实现下面的功能:在一个文本框中内容发生改变后,单击页面的其他部分将弹出一个消息框显示文本框中的内容,下面语句正确的是()A.B, C, D,以下为就业班的题目。三、数据库知识题(每题 2分 共计20分)1.存在两个结构相同的数据库表T1(col1,col2,col3)、T2(col1,col2,col3),写出一SQL语句将所有T1数据导入到T2表A、select col1,col2,col3 from T1 INTO T2 (col1,col2,col3)B、INSERT T1 (col1,col2,col3) INTO T2(col1,col2,col3)C、insert into T2 (col1,col2,col3) AS select col1,col2,col3 from T1;D、insert into T2 (col1,col2,col3) select col1,col2,col3 from T1;2. 一个表的字段为varchar2,如果建表时没有指定长度,则默认长度为:A、1 B、25 C、38 D、255 E、4000 F、建表时varchar2类型字段必须指定长度3. 用TRUNCATE和DELETE语句删除表中数据的区别?A、TRUNCATE命令不记录日志B、TRUNCATE命令记录日志C、DELETE命令不记录日志4. 如下查询语句SELECT id_number,100/quantity from inventory如果quantity为空,则查询语句的第二个字段将返回A、a space B、a null value C、a value of 0 D、a value of 100 E、the keywork null5. A表字段a 类型int中有100条记录,值分别为1至100。如下语句SELECT a FROM AWHERE A BETWEEN 1 AND 50OR (A IN (25,70,95)AND A BETWEEN 25 AND 75)则如下哪个值在这个sql语句返回的结果集中A、30 B、51 C、75 D、956. 变量v_time = 23-MAY-00,如下那条语句返回值为01-JAN-00?A SELECT ROUND(V_TIME,DAY) FROM DUAL;B SELECT ROUND(V_TIME,YEAR) FROM DUAL;C SELECT ROUND(V_TIME,MONTH) FROM DUAL;D:SELECT ROUND(TO_CHAR(V_TIME,YYYY)FROM DUAL; 7. 关于索引(indcx)的说法哪些是错误的?( )A、创建索引能提高数据插入的性能B、索引应该根据具体的检索要求来创建,在选择性好的列上创建索引C、索引并非越多越好D、建立索引可以使检索操作更迅速8. 指出下面SQL语句的错误之处:( )select id_number “Part Number”,sum(price) “price” from inventorywhere price 50 group by “Part Number” order by 2;A、order by 2B、from inventoryC、 where price 50D、group by “Part Number”9. 如下语句if v_num 5 thenv_example := 1;elsif v_num 10 thenv_example := 2;elsif v_num 20 thenv_example := 3;elsif v_num 39 thenv_example := 4;else? v_example := 5;如果v_num = 37,则v_example的值是多少?A、1 B、2 C、3 D、4 E、510. 设计一表结构,某字段要求存放员工编号,为固定10位长字符,采用哪种类型字段( )A、CHAR B、LONG C、VARCHAR D、varray四、逻辑推理(每题 2分 共计10分)1. ( ) 二. 算法题(每题15分,共计30分)(写出详细思路即可,不用写具体答案)1.MultiplesWithLimit.Problem StatementYour task is to find the minimal positive integer x such that:1. X is an integer multiple of N.2. The decimal representation of x doesnt contain any forbidden digitsYou will be given the forbidden digits as a int forbiddenDigits.If there is no solution,you should return the String “IMPOSSIBLE”(quotes for cliarity).If there is a solution and its number of digits is strictly less than 9,you should return a String containing the integer x in base 10,with no leading zeros.Otherwise,you should return a String of the form”abc.def(g digits)” (quotes for cliarity) In the return value , abc are the first three digits of the smallest valid integer x ,def are its last threee digits,and g is the number of digits in x(a base-10 integer with no leading zeros).DefinitionClass: MultiplesWithLimitMethod: minMultiplesParameters: int , intReturns: String Method signature: String minMultiples(int N,in forbiddenDigits)(be sure your method is public)Constraints- N will be between 1 and 10000,inclusive.- forbiddenDigits will contain between 0 and 10 elements, inclusive.- Each element of forbiddenDigits will be between 0 and 9,inclusive.- The elements of forbiddenDigits will be pairwise distinct.Examples0) 82,3,4,5,6,7,8,9)Returns:”1000”The smallest positive multiple of 8 that only contains digits 0 and 1 is 1000.1) 9 1,3,4,5,6,7,8,9Returns: “222.222(9 digits)”2) 5245,2,4Returns:”3668”3) 100000Returns:”IMPOSSIBLE”4) 10,1,2,3,4,5,6,7,8,9Returns:”IMPOSSIBLE”2.ColorfulStringsProblem StatementThe product value of a String is the product of all the digits(0-9)in the string , For example , the product value of “123” is 1 * 2 * 3 = 6 .A string is called colorful if it contains only digits and the product value of each of its nonempty contiguous substring is distinct.For example , the string “263” has six substrings: “2”,”6”,”3”,”26”,”63” and “263”. The product values of these substrings are : 2,6,3,2 * 6 = 12, 6 * 3 = 18 and 2 * 6 * 3 = 36,respectively.Since all six product values are distinct, “263” is colorful.On the other hand, “263” is not colorful because two of its substrings,”6” and “23” ,have the same product value (6 = 2 * 3).Return the k-th(1-based) lexicongraphically smallest colorful string of length n . If there are less than k colorful string of length n, return an empty String instead.Definition Class:Col

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论