瑞海软件Java面试题New.doc_第1页
瑞海软件Java面试题New.doc_第2页
瑞海软件Java面试题New.doc_第3页
瑞海软件Java面试题New.doc_第4页
瑞海软件Java面试题New.doc_第5页
全文预览已结束

下载本文档

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

文档简介

瑞海软件Java面试题1. 谈谈&和&的区别2. 数组有没有length()这个方法? String有没有length()这个方法?3. HashMap和Hashtable的区别4. Collection 和 Collections的区别5. Math.round(11.5)等於多少? Math.round(-11.5)等於多少?6. String s = new String(xyz);创建了几个String Object?, 分别是什么?7. error和exception有什么区别?8. abstract的method是否可同时是static,是否可同时是native,是否可同时是synchronized?9. 接口是否可继承接口? 抽象类是否可实现(implements)接口? 抽象类是否可继承实体类(concrete class)?10. 当一个线程进入一个对象的一个synchronized方法后,其它线程是否可进入此对象的其它方法?11. try 里有一个return语句,那么紧跟在这个try后的finally 里的code会不会被执行,什么时候被执行,在return前还是后? 12. 问以下程序将会打印出什么? 父类package test; public class FatherClass public FatherClass() System.out.println(FatherClass Create); 子类: package test; import test.FatherClass; public class ChildClass extends FatherClass public ChildClass() System.out.println(ChildClass Create); public static void main(String args) FatherClass fc = new FatherClass(); ChildClass cc = new ChildClass(); 补充完善以下程序,以实现设计2个线程,其中两个线程每次对j增加1,另外两个线程对j每次减少1。对j增减的时候不需要考虑顺序问题。Write the SQL statements that implement the database schema that corresponds to the following ER model. The entity “Child” is a weak entity which depends on “Employee”. Your answer should also include the statement of the relevant integrity constraints. The answer can be given purely in terms of two CREATE statements.答:Description for the following two questions:Consider a small database for a library. The database stores general information about books, the physical copies of each book they have in the library, their readers and the books/copies that were or are given out on loan. This information is stored in the following relations (primary keys are represented in bold underlined and foreign keys in bold italic (arrows are also drawn for foreign keys to improve readability):BookISBNtitleauthorspublisheryearpricePhysicalCopycatalogNoISBNlocationmaxDaysLoanoverdueChargePerDayReaderuserNamenameaddressmaxNoBooksForLoanLoanuserNamecatalogNodateOutdateInQuestion 213Express the following natural language queries in SQL:a) List the title, authors, and price for all the books published by Addison-Wesley in 2000, in alphabetical order with respect to titles.2b) List the titles of all the books that can be taken on loan for more than three days.2c) List how many non-returned books (as in physical copies) does the reader “Goldy Smith” have (hint: a non-returned book has no value for dateIn).2d) List all the readers (as name and address) who have books overdue, together with the titles of these books (a book is considered overdue if it was not yet returned and it was on loan for more than the maximum number of days allowed (maxDaysLoan) (hint: assume that the difference between two values of type DATE corresponds to the data type associated with maxDaysLoan; CURRENT_DATE is an SQL unary operator which returns the current date).3 e) List the names of all the readers who have non-returned books together with the total number of non-returned books, but only if this total exceeds their quota (maxNoBooksForLoan).4Question 36Express the following integrity constraints in SQL:a) Books located in Reference should not be allowed to be borrowed, i.e., the maxDaysLoan for all their copies should be zero (note that this will not stop an actual loan to happen and even to be recorded in the database).3b) Books whose price exceeds 100 should not be allowed to be borrowed (the same observation as above ap

温馨提示

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

评论

0/150

提交评论