IBM java 英文面试题(附参考答案)

合集下载

IBM、SUN等公司的Java面试的题集

IBM、SUN等公司的Java面试的题集

IBM、SUN等公司的Java面试的题集找工作要面试,有面试就有对付面试的办法。

以下一些题目我和我朋友痛苦的面试经历,提这些问题的公司包括IBM, E*Trade, Siebel, Motorola, SUN, 以及其它大小公司。

IBM、SUN等公司的Java面试题集上 2:IBM、SUN等公司的Java 面试题集下面试是没什么道理可讲的',它的题目有的不合情理、脱离实际。

有在纸上写的,有当面考你的,也有在电话里问的,给你IDE的估计很少(否则你赶快去买彩票,说不定中)。

所以如果你看完此文后,请不要抱怨说这些问题都能用IDE来解决。

你必须在任何情况下准确回答这些问题,在面试中如果出现一两题回答不准确很有可能你就被拒之门外了。

当然这些都是Java的基本题,那些面试的人大多数不会问你Hibernate有多先进,Eclipse的三个组成部分,或mand design pattern,他们都是老一辈了,最喜欢问的就是基础知识。

别小看了这些基础,我朋友水平一流,结果就栽在一到基础知识的问题下,和高薪无缘。

好了废话少说,开始正题。

第一,谈谈final, finally, finalize的区别。

最常被问到。

第二,Anonymous Inner Class (匿名内部类) 是否可以extends(继承)其它类,是否可以implements(实现)interface(接口)?第三,Static Nested Class 和 Inner Class的不同,说得越多越好(面试题有的很笼统)。

第四,&和&&的区别。

这个问得很少。

第五,HashMap和Hashtable的区别。

常问。

第六,Collection 和 Collections的区别。

你千万别说一个是单数一个是复数。

第七,什么时候用assert。

API级的技术人员有可能会问这个。

第八,GC是什么? 为什么要有GC?基础。

第九,String s = new String(xyz);创建了几个String Object?第十,Math.round(11.5)等於多少? Math.round(-11.5)等於多少?第十一,short s1 = 1; s1 = s1 + 1;有什么错? short s1 = 1; s1 += 1;有什么错?面试题都是很变态的,要做好受虐的准备。

英文java面试题(含答案)

英文java面试题(含答案)

英文java面试题(含答案)1.Tell me a little about yourselfI am holding a master degress in software science and had 2-year work experience in software development. I have used J2EE technology for 2 years,including Jsp,servlet,javabean,XML,EJB,I also used C language for half year and IBM mainframe technology half year and IBM mainframe technology half year.And the projects I participated in follow the Waterfall model lifecycle starting from design,then coding ,testing,maintenance.2.Describe a situation where you had to work under pressure,and explain how you handle it.Once when we did a mainframe project,our customer wanted to see a demo from our team before they signed the contract with our company.It is urgent,because our customer didn t give us enough time to do it. So all my team menbers had to work overtime,but we finished it punctually and perfectly . Our customer was satisfied with it.Actually,It is common to meet some deadlines or work under pressure in IT field.I am ok with it.3.What would your last employer tell me about your work performanceI am sure my last employer will praise my work performance,because he was reluctant to let me go when I told him I want to quit and study abroad,and he said I am welcome to come back when I finish study.4.What is your major weaknessI always want everything to be perfect.Sometimes,I am over-sensitive. When a design pattern or technical solution comes up during a meeting discussion,I am always the first one to test the feasibility.Some leader don t like such person because sometimes it is embarrassing when I prove it doesn t work while the leader still believe it is a perfect solution,But I think I did nothing wrong about it,it is good for the company.5.Why did you leave your last jobAlthough I did well in the last company,I always feel the theoretical study and actual practice are equally important and depend on each other.So,I decide to further study and actual practice are equally important and dependent on each other.So,I decide to further study to extend my theory in computer science.6.What are your strengthsWhat I am superior to others I believe is strong interest in software development I have.Many friends of mine working in IT field are holding bachelor degree or master degree and have worked for several years,but they don t have much interest in it,they only treat what they do everything a job,a means to survive,they don t have career plan at all. I am different. I like writing programs.I have set up my career goal long time ago.I will do my best to make it possible in the future.And I have worked hard towards this goal for several years.7.What are your future career plansI would like to be a software engineer now.but my career goal is to be an excellent software architector in the future.I like writing programs. Software is a kind of art, although sometimes it drove me crazy,after I overcame the difficulties I feel I am useful,I will keep working in IT field.8.What are your salary expectationsI believe your company will set up reasonable salary for me according to my ability,so I don t worry about it at all.Between 7000 to 8000 monthly9. Why are you interested in this position?Your company specializes in providing technical solutionsto customers and the last company I worked in also specializes in this field. I have relevant skills and experiences meeting your requirement.I am sure I can do it well.10.Do you have any questions that you would like to ask meWhat is a typical workday like and what would I doWhat is your expectation for me in this job11.What J2EE design patterns have you used beforeCommand/Session Facade/Service Locator/Data Access Object/Business Delegate。

Java面试问题(英语)

Java面试问题(英语)

Java Interview QuestionsBrought to you by:World’s Largest Resource for FREE Interview / Viva Questions/interview-questions/A Vyom Enterprise – 1. How can you achieve Multiple Inheritance in Java?Java's interface mechanism can be used to implement multiple inheritance, with one important difference from c++ way of doing MI: the inherited interfaces must be abstract. This obviates the need to choose between different implementations, as with interfaces there are no implementations.2. Replacing Characters in a String// Replace all occurrences of 'a' with 'o'String newString = string.replace('a', 'o');Replacing Substrings in a Stringstatic String replace(String str,String pattern, String replace) {int s = 0;int e = 0;StringBuffer result = new StringBuffer();while ((e = str.indexOf(pattern, s)) >= 0) {result.append(str.substring(s, e));result.append(replace);s = e+pattern.length();}result.append(str.substring(s));return result.toString();}Converting a String to Upper or Lower Case// Convert to upper caseString upper = string.toUpperCase();// Convert to lower caseString lower = string.toLowerCase();Converting a String to a Numberint i = Integer.parseInt("123");long l = Long.parseLong("123");float f = Float.parseFloat("123.4");double d = Double.parseDouble("123.4e10");Breaking a String into WordsString aString = "word1 word2 word3";StringTokenizer parser =new StringTokenizer(aString);while (parser.hasMoreTokens()) {processWord(parser.nextToken());3. Searching a StringString string = "aString";// First occurrence.int index = string.indexOf('S'); // 1// Last occurrence.index = stIndexOf('i'); // 4// Not found.index = stIndexOf('z'); // -14. Connecting to a Database and Strings HandlingConstructing a StringIf you are constructing a string with several appends, it may be more efficient to construct it using a StringBuffer and then convert it to an immutable String object.StringBuffer buf = new StringBuffer("Initial Text");// Modifyint index = 1;buf.insert(index, "abc");buf.append("def");// Convert to stringString s = buf.toString();Getting a Substring from a Stringint start = 1;int end = 4;String substr = "aString".substring(start, end); // Str5. What is a transient variable?A transient variable is a variable that may not be serialized. If you don't want some field not to be serialized,you can mark that field transient or static.6. What is the difference between Serializalble and Externalizable interface?When you use Serializable interface, your class is serialized automatically by default. But you can override writeObject() and readObject()two methods to control more complex object serailization process. When you use Externalizable interface, you have a complete control over your class's serialization process.7. How many methods in the Externalizable interface?There are two methods in the Externalizable interface. You have to implement these two methods in order to make your class externalizable. These two methods are readExternal() and writeExternal().8. How many methods in the Serializable interface?There is no method in the Serializable interface. The Serializable interface acts as a marker, telling the object serialization tools that your class is serializable.9. How to make a class or a bean serializable?By implementing either the java.io.Serializable interface, or the java.io.Externalizable interface. As long as one class in a class's inheritance hierarchy implements Serializable or Externalizable, that class is serializable.10. What is the serialization?The serialization is a kind of mechanism that makes a class or a bean persistence by having its properties or fields and state information saved and restored to and from storage.11. What are synchronized methods and synchronized statements?Synchronized methods are methods that are used to control access to an object. A thread only executes a synchronized method after it has acquired the lock for the method's object or class. Synchronized statements are similar to synchronized methods. A synchronized statement can only be executed after a thread has acquired the lock for the object or class referenced in the synchronized statement.12. What is synchronization and why is it important?With respect to multithreading, synchronization is the capability to control the access of multiple threads to shared resources. Without synchronization, it is possible for one thread to modify a shared object while another thread is in the process of using or updating that object's value. This often causes dirty data and leads to significant errors.13. What is the purpose of finalization?The purpose of finalization is to give an unreachable object the opportunity to perform any cleanup processing before the object is garbage collected.14. What classes of exceptions may be caught by a catch clause?A catch clause can catch any exception that may be assigned to the Throwable type. This includes theError and Exception types.15. What is the difference between the Reader/Writer class hierarchy and the InputStream/OutputStream class hierarchy?The Reader/Writer class hierarchy is character-oriented, and the InputStream/OutputStream class hierarchy is byte-oriented.16. What happens when a thread cannot acquire a lock on an object?If a thread attempts to execute a synchronized method or synchronized statement and is unable to acquire an object's lock, it enters the waiting state until the lock becomes available.17. What restrictions are placed on method overriding?Overridden methods must have the same name, argument list, and return type. The overriding method may not limit the access of the method it overrides. The overriding method may not throw any exceptions that may not be thrown by the overridden method.18. What restrictions are placed on method overloading?Two methods may not have the same name and argument list but different return types.19. How does multithreading take place on a computer with a single CPU?The operating system's task scheduler allocates execution time to multiple tasks. By quickly switching between executing tasks, it creates the impression that tasks execute sequentially.20. How is it possible for two String objects with identical values not to be equal under the == operator?The == operator compares two objects to determine if they are the same object in memory. It is possible for two String objects to have the same value, but located indifferent areas of memory.21. How are this() and super() used with constructors?this() is used to invoke a constructor of the same class. super() is used to invoke a superclass constructor. 22. What class allows you to read objects directly from a stream?The ObjectInputStream class supports the reading of objects from input streams.23. What is the ResourceBundle class?The ResourceBundle class is used to store locale-specific resources that can be loaded by a program to tailor the program's appearance to the particular locale in which it is being run.24. What interface must an object implement before it can be written to a stream as an object?An object must implement the Serializable or Externalizable interface before it can be written to a stream as an object.25. What is Serialization and deserialization?Serialization is the process of writing the state of an object to a byte stream. Deserialization is the process of restoring these objects.26. What are the Object and Class classes used for?The Object class is the highest-level class in the Java class hierarchy. The Class class is used to represent the classes and interfaces that are loaded by a Java program.27. Can you write Java code for declaration of multiple inheritance in Java ?Class C extends A implements B{}28. What do you mean by multiple inheritance in C++ ?Multiple inheritance is a feature in C++ by which one class can be of different types. Say class teachingAssistant is inherited from two classes say teacher and Student.29. Write the Java code to declare any constant (say gravitational constant) and to get its value.Class ABC{static final float GRAVITATIONAL_CONSTANT = 9.8;public void getConstant(){system.out.println("Gravitational_Constant: " + GRAVITATIONAL_CONSTANT);}}30. What are the disadvantages of using threads?DeadLock.31. Given two tables Student(SID, Name, Course) and Level(SID, level) write the SQL statement to get the name and SID of the student who are taking course = 3and at freshman level.SELECT , Student.SIDFROM Student, LevelWHERE Student.SID = Level.SIDAND Level.Level = "freshman"AND Student.Course = 3;32. What do you mean by virtual methods?virtual methods are used to use the polymorhism feature in C++. Say class A is inherited from class B. If we declare say fuction f() as virtual in class B and override the same function in class A then at runtime appropriate method of the class will be called depending upon the type of the object.33. What do you mean by static methods?By using the static method there is no need creating an object of that class to use that method. We can directly call that method on that class. For example, say class A has static function f(), then we can call f() function as A.f(). There is no need of creating an object of class A.34. What do mean by polymorphism, inheritance, encapsulation?Polymorhism: is a feature of OOPl that at run time depending upon the type of object the appropriate method is called.Inheritance: is a feature of OOPL that represents the "is a" relationship between different objects(classes).Say in real life a manager is a employee. So in OOPL manger class is inherited from the employee class.Encapsulation: is a feature of OOPL that is used to hide the information.35. What are the advantages of OOPL?Object oriented programming languages directly represent the real life objects. The features of OOPL as inhreitance, polymorphism, encapsulation makes it powerful.36. How many methods do u implement if implement the Serializable Interface?The Serializable interface is just a "marker" interface, with no methods of its own to implement.37. Are there any other 'marker' interfaces?java.rmi.Remotejava.util.EventListener38. What is the difference between instanceof and isInstance?instanceof is used to check to see if an object can be cast into a specified type without throwing a cast class exception. isInstance() determines if the specified object is assignment-compatible with the object represented by this Class. This method is the dynamic equivalent of the Java language instanceof operator.The method returns true if the specified Object argument is nonnull and can be cast to the reference type represented by this Class object without raising a ClassCastException. It returns false otherwise.39. why do you create interfaces, and when MUST you use one?You would create interfaces when you have two or more functionalities talking to each other. Doing it this way help you in creating a protocol between the parties involved.40. What's the difference between the == operator and the equals() method? What test does Object.equals() use, and why?The == operator would be used, in an object sense, to see if the two objects were actually the same object.This operator looks at the actually memory address to see if it actually the same object. The equals() method is used to compare the values of the object respectively. This is used in a higher level to see if the object values are equal.Of course the the equals() method would be overloaded in a meaningful way for whatever object that you were working with.41. Discuss the differences between creating a new class, extending a class and implementing an interface; and when each would be appropriate.* Creating a new class is simply creating a class with no extensions and no implementations. The signature is as followspublic class MyClass(){}* Extending a class is when you want to use the functionality of another class or classes. The extended class inherits all of the functionality of the previous class. An exampleof this when you create your own applet class and extend from java.applet.Applet. This gives you all of the functionality of the java.applet.Applet class. The signature wouldlook like thispublic class MyClass extends MyBaseClass{}* Implementing an interface simply forces you to use the methods of the interface implemented. This gives you two advantages. This forces you to follow a standard(forcesyou to use certain methods) and in doing so gives you a channel for polymorphism. This isn’t the only way you can do polymorphism but this is one of the ways.public class Fish implements Animal{}42. Given a text file, input.txt, provide the statement required to open this file with the appropriate I/O stream to be able to read and process this file.43. Name four methods every Java class will have.public String toString();public Object clone();public boolean equals();public int hashCode();44. What does the "abstract" keyword mean in front of a method? A class?Abstract keyword declares either a method or a class. If a method has a abstract keyword in front of it, it is called abstract method.Abstract method has no body. It has only arguments and return type. Abstract methods act as placeholder methods that are implemented in the subclasses. Abstract classes can't be instantiated.If a class is declared as abstract,no objects of that class can be created.If a class contains any abstract method it must be declared as abstract.45. Does Java have destructors?No garbage collector does the job working in the background46. Are constructors inherited? Can a subclass call the parent's class constructor? When?You cannot inherit a constructor. That is, you cannot create a instance of a subclass using a constructor of one of it's superclasses. One of the main reasons is because you probably don't want to overide the superclasses constructor, which would be possible if they were inherited. By giving the developer the ability to override a superclasses constructor you would erode the encapsulation abilities of the language.47. What synchronization constructs does Java provide? How do they work?48. Why "bytecode"? Can you reverse-engineer the code from bytecode?49. Does Java have "goto"?No50. What does the "final" keyword mean in front of a variable? A method? A class?FINAL for a variable : value is constantFINAL for a method : cannot be overriddenFINAL for a class : cannot be derivedWant More Interview Questions?More than 800 Java/J2EE Interview / Viva Questions availablefor FREE at/interview-questions/World’s Largest FREE Interview Questions GuideJava Interview Questions – Subscribe to FREE & Exclusive career resources at /CareerMag/IMPORTANT RESOURCES FOR STUDENTS• FREE career resources for students – .• World’s Largest Free eBooks directory – • Take Free Online Exams/Mock exams for GRE, GATE, TOEFL, MCSD, MCSE, CCNA, CAT, C, C++, JAVA, IIT etc at • Get Complete set of Placement papers of all companies & Software jobs FREE at• FREE Download 20,000++ softwares & ebooks at • Get Thousands of FREE Source codes in most of Computer platforms at• Get your FREE dose of Fresher/Experienced Jobs direct to your mail box at/careermag• Discuss Freely all your enquiries and doubts to the greatest possible depth at• World’s largest FREE interview / viva questions resource –/interview-questions/© Jobs (/) and Vyom (/) – Free Student Resources。

30道英文Java面试题附英文答案(1-15)

30道英文Java面试题附英文答案(1-15)

内容摘要:如果你打算参加IT外企的java软件工程师面试的话,本文你点详细研读一下。

软件开发行业的外企面试一般都是全英文哦(技术面试和非技术面试)。

内容正文:* Q1. How could Java classes direct program messages to the system console, but error messages, say to a file?.The class System has a variable out that represents the standard output, and the variable err that represents the standard error device. By default, they both point at the system console. This how the standard output could be re-directed:Stream st = new Stream(new FileOutputStream("output.txt"));System.setErr(st); System.setOut(st);* Q2. What's the difference between an interface and an abstract class?A. An abstract class may contain code in method bodies, which is not allowed in an interface. With abstract classes, you have to inherit your class from it and Java does not allow multiple inheritance. On the other hand, you can implement multiple interfaces in your class.* Q3. Why would you use a synchronized block vs. synchronized method?A. Synchronized blocks place locks for shorter periods than synchronized methods.* Q4. Explain the usage of the keyword transient?A. This keyword indicates that the value of this member variable does not have to be serialized with the object. When the class will be de-serialized, this variable will be initialized with a default value of its data type (i.e. zero for integers).* Q5. How can you force garbage collection?A. You can't force GC, but could request it by calling System.gc(). JVM does not guarantee that GC will be started immediately.* Q6. How do you know if an explicit object casting is needed?A. If you assign a superclass object to a variable of a subclass's data type, you need to do explicit casting. For example:Object a; Customer b; b = (Customer) a;When you assign a subclass to a variable having a supeclass type, the casting is performed automatically.* Q7. What's the difference between the methods sleep() and wait()A. The code sleep(1000); puts thread aside for exactly one second. The code wait(1000), causes a wait of up to one second. A thread could stop waiting earlier if it receives the notify() or notifyAll() call. The method wait() is defined in the class Object and the method sleep() is defined in the class Thread.* Q8. Can you write a Java class that could be used both as an applet as well as an application?A. Yes. Add a main() method to the applet.* Q9. What's the difference between constructors and other methods?A. Constructors must have the same name as the class and can not return a value. They are only called once while regular methods could be called many times.* Q10. Can you call one constructor from another if a class has multiple constructorsA. Yes. Use this() syntax.* Q11. Explain the usage of Java packages.A. This is a way to organize files when a project consists of multiple modules. It also helps resolve naming conflicts when different packages have classes with the same names. Packages access level also allows you to protect data from being used by the non-authorized classes.* Q12. If a class is located in a package, what do you need to change in the OS environment to be able to use it?A. You need to add a directory or a jar file that contains the package directories to the CLASSPATH environment variable. Let's say a class Employee belongs to a package com.xyz.hr; and is located in the file c:\dev\com\xyz\hr\Employee.java. In this case, you'd need to add c:\dev to the variable CLASSPATH. If this class contains the method main(), you could test it from a command prompt window as follows:c:\>java com.xyz.hr.Employee* Q13. What's the difference between J2SDK 1.5 and J2SDK 5.0?A.There's no difference, Sun Microsystems just re-branded this version.* Q14. What would you use to compare two String variables - the operator == or the method equals()?A. I'd use the method equals() to compare the values of the Strings and the == to check if two variables point at the same instance of a String object.* Q15. Does it matter in what order catch statements for FileNotFoundException and IOExceptipon are written?A. Yes, it does. The FileNoFoundException is inherited from the IOException. Exception's subclasses have to be caught first.。

IBM java 英文面试题(附参考答案)

IBM java 英文面试题(附参考答案)

1.what is oracle.2.what is major differenece oracle8i and oracle9i.4.tell me some thing ur self.5.please tell me about oops.6.what is single inheritance.7.what is multiple inheritance.8.can java support multiple inheritance.9.what is interface.10.what is differenec between abstract class and interface.11.how to u prove that abstrace class cannot instantiate directly.12.what is differenece between string and stringbuffer.13.what is immutable14.how to write a program using sort program.15 how to write a program using unsort program.16.what is legacy.17.what is legacy api18.what is legacy interface.19.what is main difference hashmap and hastable20.what is main difference between arraylist and vector.21.what is struts framework.22.what are distributed techonologies.23.what is advantage and disadvantage of distributed techonologies.24.what is main difference between jsp and servlets.25.what is difference between procedure and functions.26.what is jdbc.27.what are type of drivers.28.what is type 4 driver.29.how to collect requuirements form u r client.30.which process use in ur project.31.what is deployment descriptor.32.what is heirarchy of files in struts.33.please draw struts frame wrok.34.please draw j2ee architecture.35.please draw mvc-2 architecture.36.please draw that how design op module.37.how to find a file on linux.38.how to configure weblogic8.1 on linux.39.why you use struts framework in ur project.40.what is platfrom independent41.what is awt and swing.42.what is heavy wieght components.43.what is feature of weblgoic8.1.44.why you choose application server on linux and database server on aix.45.please tell me about ur project.46.what is major concepts in oops.47.why u choose mvc-2 architecture.48.what is implicit object.49.how many implicit objects in jsp50.why choose weblogic8.1 other than any applicationserver.51.what is water fall model vs sdlc52.what is use of dataflowdiagrams53.wha t is ip in ur project.54.what about reception module—————————————————————————————————————————————————————————1. Oracle is an RDBMS product with DDL and DML from a company called Oracle Inc.2. Difference between 8i and 9i is given in the Oracle site3. Question not available4. Something5. oops is Object Oriented Programming6.what is single inheritance.ans:one class is inherited by only other one class7.what is multiple inheritance.ans:One class inheriting more than one class at atime8.can java support multiple inheritance.ans:No9.what is interface.ans:Interface has only method declarations but no defn10.what is differenec between abstract class and interface.ans:In abstract class some methods may contain definition,but in interface every method should be abstract11.how to u prove that abstrace class cannot instantiate directly.ans:As they dont have constructor they cant be instantiated 12.what is differenece between string and stringbuffer.ans:Strings are immutable where as string buffer can be modified 13.what is immutableans:Which cant be changed14.how to write a program using sort program.15 how to write a program using unsort program.ans: Both can be done using javascriptThis is for Sortfunction SelectTextSort(obj) { // sort by textvar N=obj.options.length;for (var i=0;i<N-1;i++) {for (var j=i+1;j<N;j++) {if ( obj.options[i].text > obj.options[j].text ) {var i1= (obj.options[i].selected == true ) ? true : falsevar j1= (obj.options[j].selected == true ) ? true : falsevar q1 = obj.options[j].text;var q2 = obj.options[j].value;obj.options[j].text = obj.options[i].text;obj.options[j].value = obj.options[i].value;obj.options[i].text = q1;obj.options[i].value = q2;obj.options[i].selected = (j1 && true ) ? true : falseobj.options[j].selected = (i1 && true ) ? true : false}}}return true}16.what is legacy.17.what is legacy api18.what is legacy interface.ans: legacy is something that is old in terms of technology/ system19.what is main difference hashmap and hastableans:Hash table is synchronised20.what is main difference between arraylist and vector.ans:Vector is synchronised21.what is struts framework.22.what are distributed techonologies.distributed technologies means any technology / s/w program that are having many components in multiple environments that interact with each other depending on the functional requirements and design.23.what is advantage and disadvantage of distributed techonologies.overdependance on single platform / single language is avoided. Application can be built flexible to meet requirements. Division of labour is possible. Best of all the technologies andplatforms can be optimally utilized. Complexity of requirements can be reduced.25.what is difference between procedure and functions.'ans:Fuctions can return value ,procedures cant return value26.what is jdbc.ans:Connecting to DB from java program requires JDBC27.what are type of drivers.type1,2,3,429.how to collect requuirements form u r client.is not a job of a technical person. It is better for a BA to do it.30.which process use in ur project.Generally u can say:Project related process: Analysis, Design, Sign-off Documents, Implementation, Integration, Testing, UATWork related process:Technical Design, Work Allocation, Code Review Checklist, Unit Test Form will be prepared by the Project Lead and given to the developer.Developer prepares the Unit Test CaseImplements Code, Performs TestSubmits Code through CVS / VSSSubmits documents along with Release Checklist to the tester / leader.31.what is deployment descriptor.ans:Which contains the infrnmation like which file to be used 40.what is platfrom independentans:A language is said to be platform independent if it can be run on any machine with out modifying code41.what is awt and swing.ans:AWT are heavy weight components and swings are light weight components46.what is major concepts in oops.ans:Abstraction,polymorphism,encapsulation,inheritance47.why u choose mvc-2 architecture.ans:In MVC-2 controller is servlet rather than JSP which makes it efficient48.what is implicit object.ans:Implicit objects are a set of Java objects that the JSP Container makes available to developers in each page49.how many implicit objects in jspans:out,page,session,request,response,application,page context,config。

ibm面试题及答案

ibm面试题及答案

ibm面试题及答案在求职过程中,面试通常是每个求职者必须面对的挑战之一。

IBM作为一家全球知名的IT公司,其面试过程也被广大求职者所关注。

本文将介绍一些常见的IBM面试题,并提供相应的答案,帮助读者更好地准备和应对IBM面试。

一、自我介绍类1. 请简单介绍一下你自己。

答:首先,感谢面试官给我这次机会。

我叫XXX,毕业于XXX大学,专业是XXX。

我对计算机科学非常感兴趣,并在大学期间取得了优异的学业成绩。

我曾在实习期间参与了一个软件开发项目,这让我对软件开发有了更深入的理解和经验。

我热爱编程,具备良好的团队合作能力,并且能够快速学习适应新的技术和工作环境。

2. 你在过去的项目中遇到过什么难题,你是如何解决的?答:在过去的一个项目中,我们的团队遇到了一个性能瓶颈的问题。

经过分析,我发现问题是由于代码中的一处低效算法导致的。

为了解决这个问题,我首先进行了性能测试,并使用性能分析工具定位到问题的具体位置。

然后,我重写了相应的代码,改用更高效的算法,并对其进行了测试和验证。

最终,我们成功地解决了这个性能问题,并大大提升了系统的整体性能。

二、技术问题类1. 请谈谈你对面向对象编程的理解。

答:面向对象编程是一种软件开发的方法论,它将数据以及对数据的操作封装成对象,通过对象之间的交互来完成程序的功能。

面向对象编程的核心概念有封装、继承和多态。

封装可以隐藏对象内部的细节,提供公共的接口供其他对象使用;继承可以定义对象之间的层次关系,实现代码的复用;多态可以根据对象的具体类型执行不同的操作。

面向对象编程具有代码的可维护性、可扩展性和可重用性等优点,广泛应用于软件开发领域。

2. 请解释一下什么是数据库事务。

答:数据库事务是指一组对数据库的操作,这些操作要么全部执行成功,要么全部执行失败。

事务具有四个特性,即原子性(atomicity)、一致性(consistency)、隔离性(isolation)和持久性(durability)。

ibmjava面试题

ibmjava面试题

ibmjava面试题IBM Java面试题[Introduction]Java是一种广泛应用于软件开发领域的编程语言,而IBM作为全球知名的科技巨头,自然在Java面试中具有一定的权威性。

本文将就IBM Java面试题进行探讨,帮助读者深入了解和应对此类面试问题。

[1. Java基础知识]Java的基础知识是面试中的必备要素,下面列举一些IBM Java面试中常考的基础知识问题:1.1 什么是Java虚拟机(JVM)?Java虚拟机是Java语言的核心和基础,是Java的运行环境。

它将Java字节码转化为机器码并执行,实现了平台无关性。

1.2 请简要介绍Java中的访问修饰符。

Java中的访问修饰符包括public、protected、private和默认(default)。

它们用于控制访问类、变量、方法的权限。

1.3 什么是Java中的自动装箱和拆箱?自动装箱是指将基本数据类型自动转换为对应的包装类类型,而自动拆箱是指将包装类类型自动转换为对应的基本数据类型。

[2. 并发编程]在Java开发领域,对并发编程的理解和应用能力是非常重要的考察要素。

以下是IBM Java面试中可能涉及的并发编程问题:2.1 什么是线程安全?线程安全是指多线程环境下共享对象能够正确地被多个线程访问和操作,不会出现数据污染或不一致的情况。

2.2 请解释Java中的锁机制。

Java中的锁机制是通过synchronized关键字来实现的。

它可以用于修饰方法或代码块,保证同一时间只能有一个线程进入同步区域。

2.3 请介绍一下Java中的线程池。

线程池是一种管理和复用线程资源的机制,它可以有效地控制线程的并发数量,提高系统的性能和稳定性。

[3. 面向对象编程]面向对象编程是Java的核心特性之一,也是IBM Java面试中经常关注的领域。

以下是一些可能出现的面向对象编程问题:3.1 请解释Java中的封装、继承和多态。

封装是指将数据和行为封装到一个类中,对外部隐藏实现细节;继承是指通过扩展已有类,创建新的类,实现代码的重用;多态是指同一操作作用于不同的对象,产生不同的结果。

Java_英文面试题

Java_英文面试题

英文Java面试题Question: What is transient variable?Answer: Transient variable can't be serialize. For example if a variable is declared as transient in a Serializable class and the class is written to an ObjectStream, the value of the variable can't be written to the stream instead when the class is retrieved from the ObjectStream the value of the variable becomes null.Question: Name the containers which uses Border Layout as their default layout?Answer: Containers which uses Border Layout as their default are: window, Frame and Dialog classes.Question: What do you understand by Synchronization?Answer: Synchronization is a process of controlling the access of shared resources by the multiple threads in such a manner that only one thread can access one resource at a time. In non synchronized multithreaded application, it is possible for one thread to modify a shared object while another thread is in the process of using or updating the object's value. Synchronization prevents such type of data corruption.E.g. Synchronizing a function:public synchronized void Method1 () {// Appropriate method-related code.}E.g. Synchronizing a block of code inside a function:public myFunction (){synchronized (this) {// Synchronized code here.}}Question: What is Collection API?Answer: The Collection API is a set of classes and interfaces that support operation on collections of objects. These classes and interfaces are more flexible, more powerful, and more regular than the vectors, arrays, and hashtables if effectively replaces.Example of classes: HashSet, HashMap, ArrayList, LinkedList, TreeSet and TreeMap.Example of interfaces: Collection, Set, List and Map.Question: Is Iterator a Class or Interface? What is its use?Answer: Iterator is an interface which is used to step through the elements of a Collection.Question: What is similarities/difference between an Abstract class and Interface?Answer: Differences are as follows:Interfaces provide a form of multiple inheritance. A class can extend only one other class. Interfaces are limited to public methods and constants with no implementation. Abstract classes can have a partial implementation, protected parts, static methods, etc.A Class may implement several interfaces. But in case of abstract class, a class may extend only one abstract class.Interfaces are slow as it requires extra indirection to find corresponding method in the actual class. Abstract classes are fast.Similarities:Neither Abstract classes or Interface can be instantiated.Question: How to define an Abstract class?Answer: A class containing abstract method is called Abstract class. An Abstract class can't be instantiated.Example of Abstract class:abstract class testAbstractClass {protected String myString;public String getMyString() {return myString;}public abstract string anyAbstractFunction();}Question: How to define an Interface?Answer: In Java Interface defines the methods but does not implement them. Interface can include constants. A class that implements the interfaces is bound to implement all the methods defined in Interface.Emaple of Interface:public interface sampleInterface {public void functionOne();public long CONSTANT_ONE = 1000;}Question: Explain the user defined Exceptions?Answer: User defined Exceptions are the separate Exception classes defined by the user for specific purposed. An user defined can created by simply sub-classing it to the Exception class. This allows custom exceptions to be generated (using throw) and caught in the same way as normal exceptions.Example:class myCustomException extends Exception {// The class simply has to exist to be an exception}Question: Explain the new Features of JDBC 2.0 Core API?Answer: The JDBC 2.0 API includes the complete JDBC API, which includes both core and Optional Package API, and provides inductrial-strength database computing capabilities.New Features in JDBC 2.0 Core API:Scrollable result sets- using new methods in the ResultSet interface allows programmatically move the to particular row or to a position relative to its current positionJDBC 2.0 Core API provides the Batch Updates functionality to the java applications.Java applications can now use the ResultSet.updateXXX methods.New data types - interfaces mapping the SQL3 data typesCustom mapping of user-defined types (UTDs)Miscellaneous features, including performance hints, the use of character streams, full precision for java.math.BigDecimal values, additional security, and support for time zones in date, time, and timestamp values.Question: Explain garbage collection?Answer: Garbage collection is one of the most important feature of Java. Garbage collection is also called automatic memory management as JVM automatically removes the unused variables/objects (value is null) from the memory. User program cann't directly free the object from memory, instead it is the job of the garbage collector to automatically free the objects that are no longer referenced by a program. Every class inherits finalize() method from ng.Object, the finalize() method is called by garbage collector when it determines no more references to the object exists. In Java, it is good idea to explicitly assign null into a variable when no more in use. I Java on calling System.gc() and Runtime.gc(), JVM tries to recycle the unused objects, but there is no guarantee when all the objects will garbage collected.Question: How you can force the garbage collection?Answer: Garbage collection automatic process and can't be forced.Question: What is OOPS?Answer: OOP is the common abbreviation for Object-Oriented Programming.Question: Describe the principles of OOPS.Answer: There are three main principals of oops which are called Polymorphism, Inheritance andEncapsulation.Question: Explain the Encapsulation principle.Answer: Encapsulation is a process of binding or wrapping the data and the codes that operates on the data into a single entity. This keeps the data safe from outside interface and misuse. One way to think about encapsulation is as a protective wrapper that prevents code and data from being arbitrarily accessed by other code defined outside the wrapper.Question: Explain the Inheritance principle.Answer: Inheritance is the process by which one object acquires the properties of another object.Question: Explain the Polymorphism principle.Answer: The meaning of Polymorphism is something like one name many forms. Polymorphism enables one entity to be used as as general category for different types of actions. The specific action is determined by the exact nature of the situation. The concept of polymorphism can be explained as "one interface, multiple methods".Question: Explain the different forms of Polymorphism.Answer: From a practical programming viewpoint, polymorphism exists in three distinct forms in Java:Method overloadingMethod overriding through inheritanceMethod overriding through the Java interfaceQuestion: What are Access Specifiers available in Java?Answer: Access specifiers are keywords that determines the type of access to the member of a class. These are:PublicProtectedPrivateDefaultsQuestion: Describe the wrapper classes in Java.Answer: Wrapper class is wrapper around a primitive data type. An instance of a wrapper classcontains, or wraps, a primitive value of the corresponding type.Following table lists the primitive types and the corresponding wrapper classes:Primitive Wrapperboolean ng.Booleanbyte ng.Bytechar ng.Characterdouble ng.Doublefloat ng.Floatint ng.Integerlong ng.Longshort ng.Shortvoid ng.VoidQuestion: Read the following program:public class test {public static void main(String [] args) {int x = 3;int y = 1;if (x = y)System.out.println("Not equal");elseSystem.out.println("Equal");}}What is the result?A. The output is equal?br>B. The output in not Equal?br>C. An error at " if (x = y)" causes compilation to fall.D. The program executes but no output is show on console.Answer: CQuestion: what is the class variables ?Answer: When we create a number of objects of the same class, then each object will share a common copy of variables. That means that there is only one copy per class, no matter how many objects are created from it. Class variables or static variables are declared with the static keyword in a class, but mind it that it should be declared outside outside a class. These variables are stored in static memory. Class variables are mostly used for constants, variable that never change itsinitial value. Static variables are always called by the class name. This variable is created when the program starts i.e. it is created before the instance is created of class by using new operator and gets destroyed when the programs stops. The scope of the class variable is same a instance variable. The class variable can be defined anywhere at class level with the keyword static. It initial value is same as instance variable. When the class variable is defined as int then it's initial value is by default zero, when declared boolean its default value is false and null for object references. Class variables are associated with the class, rather than with any object.Question: What is the difference between the instanceof and getclass, these two are same or not ?Answer: instanceof is a operator, not a function while getClass is a method of ng.Object class. Consider a condition where we useif(o.getClass().getName().equals("ng.Math")){ }This method only checks if the classname we have passed is equal to ng.Math. The class ng.Math is loaded by the bootstrap ClassLoader. This class is an abstract class.This class loader is responsible for loading classes. Every Class object contains a reference to the ClassLoader that defines. getClass() method returns the runtime class of an object. It fetches the java instance of the given fully qualified type name. The code we have written is not necessary, because we should not compare getClass.getName(). The reason behind it is that if the two different class loaders load the same class but for the JVM, it will consider both classes as different classes so, we can't compare their names. It can only gives the implementing class but can't compare a interface, but instanceof operator can.The instanceof operator compares an object to a specified type. We can use it to test if an object is an instance of a class, an instance of a subclass, or an instance of a class that implements a particular interface. We should try to use instanceof operator in place of getClass() method. Remember instanceof opeator and getClass are not same. Try this example, it will help you to better understand the difference between the two.Interface one{}Class Two implements one {}Class Three implements one {}public class Test {public static void main(String args[]) {one test1 = new Two();one test2 = new Three();System.out.println(test1 instanceof one); //trueSystem.out.println(test2 instanceof one); //trueSystem.out.println(Test.getClass().equals(test2.getClass())); //false}}* Q1. How could Java classes direct program messages to the system console, but error messages, say to a file?.The class System has a variable out that represents the standard output, and the variable err that represents the standard error device. By default, they both point at the system console. This how the standard output could be re-directed:Stream st = new Stream(new FileOutputStream("output.txt")); System.setErr(st); System.setOut(st);* Q2. What's the difference between an interface and an abstract class?A. An abstract class may contain code in method bodies, which is not allowed in an interface. With abstract classes, you have to inherit your class from it and Java does not allow multiple inheritance. On the other hand, you can implement multiple interfaces in your class.* Q3. Why would you use a synchronized block vs. synchronized method?A. Synchronized blocks place locks for shorter periods than synchronized methods.* Q4. Explain the usage of the keyword transient?A. This keyword indicates that the value of this member variable does not have to be serialized with the object. When the class will be de-serialized, this variable will be initialized with a default value of its data type (i.e. zero for integers).* Q5. How can you force garbage collection?A. You can't force GC, but could request it by calling System.gc(). JVM does not guarantee that GC will be started immediately.* Q6. How do you know if an explicit object casting is needed?A. If you assign a superclass object to a variable of a subclass's data type, you need to do explicit casting. For example:Object a; Customer b; b = (Customer) a;When you assign a subclass to a variable having a supeclass type, the casting is performed automatically.* Q7. What's the difference between the methods sleep() and wait()A. The code sleep(1000); puts thread aside for exactly one second. The code wait(1000), causes a wait of up to one second. A thread could stop waiting earlier if it receives the notify() or notifyAll() call. The method wait() is defined in the class Object and the method sleep() is defined in the class Thread.* Q8. Can you write a Java class that could be used both as an applet as well as an application?A. Yes. Add a main() method to the applet.* Q9. What's the difference between constructors and other methods?A. Constructors must have the same name as the class and can not return a value. They are only called once while regular methods could be called many times.* Q10. Can you call one constructor from another if a class has multiple constructorsA. Yes. Use this() syntax.* Q11. Explain the usage of Java packages.A. This is a way to organize files when a project consists of multiple modules. It also helps resolve naming conflicts when different packages have classes with the same names. Packages access level also allows you to protect data from being used by the non-authorized classes.* Q12. If a class is located in a package, what do you need to change in the OS environment to be able to use it?A. You need to add a directory or a jar file that contains the package directories to the CLASSPATH environment variable. Let's say a class Employee belongs to a package com.xyz.hr; and is located in the file c:\dev\com\xyz\hr\Employee.java. In this case, you'd need to add c:\dev to the variable CLASSPATH. If this class contains the method main(), you could test it from a command prompt window as follows:c:\>java com.xyz.hr.Employee* Q13. What's the difference between J2SDK 1.5 and J2SDK 5.0?A.There's no difference, Sun Microsystems just re-branded this version.* Q14. What would you use to compare two String variables - the operator == or the method equals()?A. I'd use the method equals() to compare the values of the Strings and the == to check if two variables point at the same instance of a String object.* Q15. Does it matter in what order catch statements for FileNotFoundException and IOExceptipon are written?A. Yes, it does. The FileNoFoundException is inherited from the IOException. Exception's subclasses have to be caught first.* Q16. Can an inner class declared inside of a method access local variables of this method?A. It's possible if these variables are final.* Q17. What can go wrong if you replace && with & in the following code:String a=null; if (a!=null && a.length()>10) {...}A. A single ampersand here would lead to a NullPointerException.* Q18. What's the main difference between a Vector and an ArrayListA. Java Vector class is internally synchronized and ArrayList is not.* Q19. When should the method invokeLater()be used?A. This method is used to ensure that Swing components are updated through the event-dispatching thread.* Q20. How can a subclass call a method or a constructor defined in a superclass?A. Use the following syntax: super.myMethod(); To call a constructor of the superclass, just write super(); in the first line of the subclass's constructor.For senior-level developers:** Q21. What's the difference between a queue and a stack?A. Stacks works by last-in-first-out rule (LIFO), while queues use the FIFO rule** Q22. You can create an abstract class that contains only abstract methods. On the other hand, you can create an interface that declares the same methods. So can you use abstract classes instead of interfaces?A. Sometimes. But your class may be a descendent of another class and in this case the interface is your only option.** Q23. What comes to mind when you hear about a young generation in Java?A. Garbage collection.** Q24. What comes to mind when someone mentions a shallow copy in Java?A. Object cloning.** Q25. If you're overriding the method equals() of an object, which other method you might also consider?A. hashCode()** Q26. You are planning to do an indexed search in a list of objects. Which of the two Java collections should you use:ArrayList or LinkedList?A. ArrayList** Q27. How would you make a copy of an entire Java object with its state?A. Have this class implement Cloneable interface and call its method clone().** Q28. How can you minimize the need of garbage collection and make the memory use more effective?A. Use object pooling and weak object references.** Q29. There are two classes: A and B. The class B need to inform a class A when some important event has happened. What Java technique would you use to implement it?A. If these classes are threads I'd consider notify() or notifyAll(). For regular classes you can use the Observer interface.** Q30. What access level do you need to specify in the class declaration to ensure that only classes from the same directory can access it?A. You do not need to specify any access level, and Java will use a default package access level. The J2EE questions are coming soon. Stay tuned for Yakov Fain on Live . Ask yourquestions to Yakov on the air!=====================IBM java 英文面试题1.what is oracle.2.what is major differenece oracle8i and oracle9i.4.tell me some thing ur self.5.please tell me about oops.6.what is single inheritance.7.what is multiple inheritance.8.can java support multiple inheritance.9.what is interface.10.what is differenec between abstract class and interface.11.how to u prove that abstrace class cannot instantiate directly.12.what is differenece between string and stringbuffer.13.what is immutable14.how to write a program using sort program.15 how to write a program using unsort program.16.what is legacy.17.what is legacy api18.what is legacy interface.19.what is main difference hashmap and hastable20.what is main difference between arraylist and vector.21.what is struts framework.22.what are distributed techonologies.23.what is advantage and disadvantage of distributed techonologies.24.what is main difference between jsp and servlets.25.what is difference between procedure and functions.26.what is jdbc.27.what are type of drivers.28.what is type 4 driver.29.how to collect requuirements form u r client.30.which process use in ur project.31.what is deployment descriptor.32.what is heirarchy of files in struts.33.please draw struts frame wrok.34.please draw j2ee architecture.35.please draw mvc-2 architecture.36.please draw that how design op module.37.how to find a file on linux.38.how to configure weblogic8.1 on linux.39.why you use struts framework in ur project.40.what is platfrom independent41.what is awt and swing.42.what is heavy wieght components.43.what is feature of weblgoic8.1.44.why you choose application server on linux and database server on aix.45.please tell me about ur project.46.what is major concepts in oops.47.why u choose mvc-2 architecture.48.what is implicit object.49.how many implicit objects in jsp50.why choose weblogic8.1 other than any applicationserver.51.what is water fall model vs sdlc52.what is use of dataflowdiagrams53.wha t is ip in ur project.54.what about reception module—————————————————————————————————————————————————————————1. Oracle is an RDBMS product with DDL and DML from a company called Oracle Inc.2. Difference between 8i and 9i is given in the Oracle site3. Question not available4. Something5. oops is Object Oriented Programming6.what is single inheritance.ans:one class is inherited by only other one class7.what is multiple inheritance.ans:One class inheriting more than one class at atime8.can java support multiple inheritance.ans:No9.what is interface.ans:Interface has only method declarations but no defn10.what is differenec between abstract class and interface.ans:In abstract class some methods may contain definition,but in interface every method should be abstract11.how to u prove that abstrace class cannot instantiate directly.ans:As they dont have constructor they cant be instantiated12.what is differenece between string and stringbuffer.ans:Strings are immutable where as string buffer can be modified13.what is immutableans:Which cant be changed14.how to write a program using sort program.15 how to write a program using unsort program.ans: Both can be done using javascriptThis is for Sortfunction SelectTextSort(obj) { // sort by textvar N=obj.options.length;for (var i=0;i<N-1;i++) {for (var j=i+1;j<N;j++) {if ( obj.options[i].text > obj.options[j].text ) {var i1= (obj.options[i].selected == true ) ? true : falsevar j1= (obj.options[j].selected == true ) ? true : falsevar q1 = obj.options[j].text;var q2 = obj.options[j].value;obj.options[j].text = obj.options[i].text;obj.options[j].value = obj.options[i].value;obj.options[i].text = q1;obj.options[i].value = q2;obj.options[i].selected = (j1 && true ) ? true : falseobj.options[j].selected = (i1 && true ) ? true : false}}}return true}16.what is legacy.17.what is legacy api18.what is legacy interface.ans: legacy is something that is old in terms of technology/ system19.what is main difference hashmap and hastableans:Hash table is synchronised20.what is main difference between arraylist and vector.ans:Vector is synchronised21.what is struts framework.22.what are distributed techonologies.distributed technologies means any technology / s/w program that are having many components in multiple environments that interact with each other depending on the functional requirements and design.23.what is advantage and disadvantage of distributed techonologies.overdependance on single platform / single language is avoided. Application can be built flexible to meet requirements. Division of labour is possible. Best of all the technologies and platforms can be optimally utilized. Complexity of requirements can be reduced.25.what is difference between procedure and functions.'ans:Fuctions can return value ,procedures cant return value26.what is jdbc.ans:Connecting to DB from java program requires JDBC27.what are type of drivers.type1,2,3,429.how to collect requuirements form u r client.is not a job of a technical person. It is better for a BA to do it.30.which process use in ur project.Generally u can say:Project related process: Analysis, Design, Sign-off Documents, Implementation, Integration, Testing, UATWork related process:Technical Design, Work Allocation, Code Review Checklist, Unit Test Form will be prepared by the Project Lead and given to the developer.Developer prepares the Unit Test CaseImplements Code, Performs TestSubmits Code through CVS / VSSSubmits documents along with Release Checklist to the tester / leader.31.what is deployment descriptor.ans:Which contains the infrnmation like which file to be used40.what is platfrom independentans:A language is said to be platform independent if it can be run on any machine with out modifying code41.what is awt and swing.ans:AWT are heavy weight components and swings are light weight components46.what is major concepts in oops.ans:Abstraction,polymorphism,encapsulation,inheritance47.why u choose mvc-2 architecture.ans:In MVC-2 controller is servlet rather than JSP which makes it efficient48.what is implicit object.ans:Implicit objects are a set of Java objects that the JSP Container makes available to developers in each page49.how many implicit objects in jspans:out,page,session,request,response,application,page context,config。

java英语面试试题整理

java英语面试试题整理

1. What are java beans?JavaBeans is a portable, platform-independent component model written in the Java programming language, developed in collaboration with industry leaders. It enables developers to write reusable components once and run them anywhere -- benefiting from the platform-independent power of Java technology. JavaBeans acts as a Bridge between proprietary component models and provides a seamless and powerful means for developers to build components that run in ActiveX container applications.Java beans is very powerful tool you can use in your servlet/JSP bridge. You can use the servlets to build the bean and can be passed over to the JSP for reading. This provides tight encapsulation of the data while preserving the sanctity of servlets and JSP。

2. What is RMI?RMI stands for Remote Method Invocation. Traditional approaches to executing code on other machines across a network have been confusing as well as tedious and error-prone to implement. The nicest way to think about this problem is that some object happens to live on another machine, and that you can send a message to the remote object and get a result as if the object lived on your local machine. This simplification is exactly what Java Remote Method Invocation (RMI) allows you to do.3. How does Java inheritance work?A class can only directly extend one class at a time. Multiple inheritance is only allowed with regard to interfaces. A class can implement many interfaces. But a class can only extend one non-interface class.4. How does exception handling work in Java?1.It separates the working/functional code from the error-handling code by way of try-catch clauses.2.It allows a clean path for error propagation. If the called method encounters a situation it can't manage, it can throw anexception and let the calling method deal with it.3.By enlisting the compiler to ensure that "exceptional" situations are anticipated and accounted for, it enforces powerful coding.4.Exceptions are of two types: Compiler-enforced exceptions, or checked exceptions and Runtime exceptions, or unchecked exceptions. Compiler-enforced (checked) exceptions are instances of the Exception class or one of its subclasses -- excluding the RuntimeException branch. The compiler expects all checked exceptions to be appropriately handled. Checked exceptions must be declared in the throws clause of the method throwing them -- assuming, of course, they're not being caught within that same method. The calling method must take care of these exceptions by either catching or declaring them in its throws clause. Thus, making an exception checked forces us to pay heed to the possibility of itbeing thrown. An example of a checked exception is java.io.IOException. As the name suggests, it throws whenever an input/output operation is abnormally terminated.5. Does Java have destructors?Java does not have destructors. Garbage collector does this job periodically depending upon the memory requirements of the machine and on the fact that a particular object is no longer needed.But it has finalizers that does a similar job. The syntax ispublic void finalize() { }If an object has a finalizer, the method is invoked before the system garbage collects the object, but using finalize() does not guarantee that it would be called b4 garbage collector is invoked.6. What does the "final" keyword mean in front of a variable? A method? A class?A final variable cannot be reassigned, but it is not constant. For instance,final StringBuffer x = new StringBuffer();x.append("hello");is valid. X cannot have a new value in it, but nothing stops operations on the object that it refers, including destructive operations.Also, a final method cannot be overridden or hidden by new access specifications. This means that the compiler can choose to in-line the invocation of such a method. (I don't know if any compiler actually does this, but it's true in theory.)The best example of a final class is String, which defines a class that cannot be derived.6. Access specifiers: "public", "protected", "private", nothing?Public? Any other class from any package can instantiate and execute the classes and methods Protected? Only subclasses and classes inside of the package can access the classes and methods Private? The original class is the only class allowed to execute the methods.And in case if there is no modifier specified, it means, only the classes inside the package can access this class and its methods, it is also called "Friendly".Question:What is the difference between an Interface and an Abstract class? Question: What is the purpose of garbage collection in Java, and when is it used?Question: Describe synchronization in respect to multithreading.1.what is single inheritance.ans:one class is inherited by only other one class9.what is interface.ans:Interface has only method declarations but no definition10.what is differenec between abstract class and interface.ans:In abstract class some methods may contain definition,but in interface every method should be abstract11.how to u prove that abstrace class cannot instantiate directly.ans:As they dont have constructor they cant be instantiated12.what is differenece between string and stringbuffer.ans:Strings are immutable where as string buffer can be modified13.what is immutableans:Which cant be changed18.what is legacy interface.ans: legacy is something that is old in terms of technology/ system19.what is main difference hashmap and hastableans:Hash table is synchronized20.what is main difference between arraylist and vector.ans:Vector is synchronised22.what are distributed techonologies.distributed technologies means any technology / s/w program that are having many components in multiple environments that interact with each other depending on the functional requirements and design.23.what is advantage and disadvantage of distributed techonologies.language is avoided. Application can be built flexible to meet requirements. Division of labour is possible. Best of all the technologies and platforms can be optimally utilized. Complexity of requirements can be reduced.25.what is difference between procedure and functions.''ans:Fuctions can return value ,procedures cant return value26.what is jdbc.ans:Connecting to DB from java program requires JDBC31.what is deployment descriptor.ans:Which contains the infrnmation like which file to be used40.what is platfrom independentans:A language is said to be platform independent if it can be run on any machine with out modifying code46.what is major concepts in oops.ans:Abstraction,polymorphism,encapsulation,inheritance48.what is implicit object.ans:Implicit objects are a set of Java objects that the JSP Container makes available to developers in each page49.how many implicit objects in jspans:out,page,session,request,response,application,page context,config介绍下自己情况技术问题.基本在论坛上面资料都cover了.比如list和array 区别, pass by reference or value, memory leakage, oo基本问题, overload/override, 数据库clustered or non-clustered.还有quick sort和binary sort介绍.复杂度.适用在哪里.有什么问题等等.基本准备下应该没有问题,都很基本.这个过了就进入最后一轮AC, 是5.5个小时的.从早上8:30开始.相比以前和其他公司.今年这个长度我觉得不累.哈哈. 往年有1天半的AC.晕面试基本是. group discussion+2个technical interviews+1个interpersonal skill interview. 全部2个对你一个.group discussion 是给了几个os+database+gui资料, 然后要求选择哪个合适.四个人一组.然后2个人资料是来自相同department的email.根据自己和其他人的资料.选系统. 我可以说的就是.要get involved, 如果有不了解问题.不要怕要问其他人来确认..做完后.hr会杀入在给一个资料.然后继续做讨论15分钟.反正就是多说就是了.多和其他人交流.然后就是一般面试...介绍自己, 为什么要做这个,为什么学这个学校, teamwork, 对公司了解, 有个特别点问题就是.如果你是boss在开10人大会.下面你的员工说的东西有个很大的错误,而且很基本的错误.你怎么办.还有如果回到几年前.你会有什么选择会改变吗.(我就说不读phd了,申请ms直接.哈哈)这个部分问题很多.准备要充分.而且很多问题是根据你自己回答.他们追下去问.后面就是两个technical interview, 我大概回忆下.有np/p问题, hashmap, hash原理, deadlock问题, java GC 问题, 还有很多多线程问题(具体有点忘记了), 记得一个GC在多线程环境下的操作.还有j2ee问题.介绍下spring, soap, hibernate. (基本就可以了). c 内存操作问题, 还有internet, ip和tcp区别. 然后osi说几个protocols.第二个面试.基本都是数据结构.写个binary search tree 来找某个值, 要递归和非递归的.然后hash table, 还有点不记得了. 然后数据库.写个简单的er 图.学生, 课程.然后写sql. 还要早最大值.然后排序的sql.基本的很.然后说下dns是什么.怎么实现的.最后说下从你在浏览器输入一个网址. 到内容被全部显示的过程, 原理等等.基本面试完了.然后去吃饭和以前的graduate scheme的人聊聊.。

java英文面试题(含部分参考答案)-烽火通信

java英文面试题(含部分参考答案)-烽火通信

java英文面试题(含部分参考答案)-烽火通信1.what is oracle.2.what is major differenece oracle8i and oracle9i.4.tell me some thing ur self.5.please tell me about oops.6.what is single inheritance.7.what is multiple inheritance.8.can java support multiple inheritance.9.what is interface.10.what is differenec between abstract class and interface.11.how to u prove that abstrace class cannot instantiate directly.12.what is differenece between string and stringbuffer.13.what is immutable14.how to write a program using sort program.15 how to write a program using unsort program.16.what is legacy.17.what is legacy api18.what is legacy interface.19.what is main difference hashmap and hastable20.what is main difference between arraylist and vector.21.what is struts framework.22.what are distributed techonologies.23.what is advantage and disadvantage of distributed techonologies.24.what is main difference between jsp and servlets.25.what is difference between procedure and functions.26.what is jdbc.27.what are type of drivers.28.what is type 4 driver.29.how to collect requuirements form u r client.30.which process use in ur project.31.what is deployment descriptor.32.what is heirarchy of files in struts.33.please draw struts frame wrok.34.please draw j2ee architecture.35.please draw mvc-2 architecture.36.please draw that how design op module.37.how to find a file on linux.38.how to configure weblogic8.1 on linux.39.why you use struts framework in ur project.40.what is platfrom independent41.what is awt and swing.42.what is heavy wieght components.43.what is feature of weblgoic8.1.44.why you choose application server on linux and database server on aix.45.please tell me about ur project.46.what is major concepts in oops.47.why u choose mvc-2 architecture.48.what is implicit object.49.how many implicit objects in jsp—————————————————————————————————————————————————————————1. Oracle is an RDBMS product with DDL and DML from a company called Oracle Inc.2. Difference between 8i and 9i is given in the Oracle site3. Question not available4. Something5. oops is Object Oriented Programming6.what is single inheritance.ans:one class is inherited by only other one class7.what is multiple inheritance.ans:One class inheriting more than one class at atime8.can java support multiple inheritance.ans:No9.what is interface.ans:Interface has only method declarations but no defn10.what is differenec between abstract class and interface.ans:In abstract class some methods may contain definition,but in interface every method should be abstract11.how to u prove that abstrace class cannot instantiate directly.ans:As they dont have constructor they cant be instantiated12.what is differenece between string and stringbuffer.ans:Strings are immutable where as string buffer can be modified13.what is immutableans:Which cant be changed14.how to write a program using sort program.15 how to write a program using unsort program.ans: Both can be done using javascriptThis is for Sortfunction SelectTextSort(obj) { // sort by textvar N=obj.options.length;for (var i=0;ifor (var j=i+1;jif ( obj.options[i].text > obj.options[j].text ) {var i1= (obj.options[i].selected == true ) ? true : falsevar j1= (obj.options[j].selected == true ) ? true : falsevar q1 = obj.options[j].text;var q2 = obj.options[j].value;obj.options[j].text = obj.options[i].text;obj.options[j].value = obj.options[i].value;obj.options[i].text = q1;obj.options[i].value = q2;obj.options[i].selected = (j1 && true ) ? true : falseobj.options[j].selected = (i1 && true ) ? true : false}}}return true}16.what is legacy.17.what is legacy api18.what is legacy interface.ans: legacy is something that is old in terms of technology/ system19.what is main difference hashmap and hastableans:Hash table is synchronised20.what is main difference between arraylist and vector.ans:Vector is synchronised21.what is struts framework.22.what are distributed techonologies.distributed technologies means any technology / s/w program that are having many components in multiple environments that interact with each other depending on the functional requirements and design.23.what is advantage and disadvantage of distributed techonologies.overdependance on single platform / single language is avoided. Application can be built flexible to meet requirements. Division of labour is possible. Best of all the technologies and platforms can be optimally utilized. Complexity of requirements can be reduced.25.what is difference between procedure and functions.'ans:Fuctions can return value ,procedures cant return value26.what is jdbc.ans:Connecting to DB from java program requires JDBC27.what are type of drivers.type1,2,3,429.how to collect requuirements form u r client.is not a job of a technical person. It is better for a BA to do it.30.which process use in ur project.Generally u can say:Project related process: Analysis, Design, Sign-off Documents, Implementation, Integration, Testing, UAT Work related process:Technical Design, Work Allocation, Code Review Checklist, Unit Test Form will be prepared by the Project Lead and given tothe developer.Developer prepares the Unit Test CaseImplements Code, Performs TestSubmits Code through CVS / VSSSubmits documents along with Release Checklist to the tester / leader.31.what is deployment descriptor.ans:Which contains the infrnmation like which file to be used 不好意思,暂缺32到39的参考答案.40.what is platfrom independentans:A language is said to be platform independent if it can be run on any machine with out modifying code41.what is awt and swing.ans:AWT are heavy weight components and swings are light weight components46.what is major concepts in oops.ans:Abstraction,polymorphism,encapsulation,inheritance47.why u choose mvc-2 architecture.ans:In MVC-2 controller is servlet rather than JSP which makes it efficient48.what is implicit object.ans:Implicit objects are a set of Java objects that the JSP Container makes available to developers in each page49.how many implicit objects in jspans:out,page,session,request,response,application,page context,config转载请注明文章来源:笔试网/doc/2b1197711.html,—专业的笔试、面试资料搜索网站,原文网址:/doc/2b1197711.html,/shiti.aspx?id=536157。

联想集团Java开发英文面试题

联想集团Java开发英文面试题

Lenovo Ecommerce Software Engineer Interview Test(Time:45mins,Language:Chinese/Enginlish)1.multiple-choice question (4x10)(1)Which of the following connection classes from java.util package are Thread safe?a.Vectorb.ArrayListc.HashMapd.HashTable(2)Which two statements are true for the class java.util.TreeSet?a.The elementsin the connection are orderedb.The collection is guaranteed to be immutablec.The elements in the collection are guaranteed to be uniqued.The elements in the collection are accessed using a unique keye.The elements in the collection are guaranteed to be synchronized(3)Which two declarrations prevent the overriding of a method?a.final void method(){ }b.void final method(){ }c.static void method(){ }d.static final void method(){ }e.final abstract void method(){ }(4)You want a class to have access to member of another class in the same package which is the most restrictive access modifier that will accomplish this objective?a. publicb. privatec. protectedd. transiente. No access modifier is required(5) Which two interfaces provide the capability to store objects using a key-value pair?a. java.util.Mapb. java.util.Setc. java.util.Listd. java.util.SortedMape. java.util.SortedMapf. java.util.Collection(6) What results from attempting to compile and run the following code?public class Ternary{public static void main (String [] args){int a=5;System.out.println("Value is -"+((a<5)?9:9:9);}}a.Print: Value is – 9b.Print:Value is – 5pilation errord.None these(7)Which method placed at line 6 will cause a compiler error?1)class Super{2) public float GetNum(){return 3.0f;}3) }4)5) public class Sub extends Super{6)7) }a. public folat getNum(){return 4.0f;}b.public void getNum(){ }c.public void getNum(double d){ }d. public double getNum(float d){return 4.0d;}(8) What results from attempting to compile and run the following code?public class Comparation{public static void main (String []args){String s1="Hello world";String s2=s1;String s3=new String("Hello world");System.out.println(s1==s2);System.out.println(s1==s3);}}a.true and trueb.true and falsec.false and trued.false and false(9)What is the output of this program?public static void main(String []args){int a=1;int b=2;int c=3;a/=4;b>>=1;c<<=1;a^=c;System.out.println(a+""+b+""+c);}a. 3 1 6b. 2 2 3c. 2 3 4d. 3 3 6(10) Which path should has file that contains XML configuration metadata for ApplicationContext of given DispatcherServlet?<web-app version="2.5"><servlet><servlet-name>dispatcher</servlet-name><servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <servlet-mapping><servlet-name>dispatcher</servlet-name><url-pattenrn>/*</url-pattenrn></servlet-mapping>a./WEB-INF/application-context.xmlb./dispatcher-servlet.xmlc./WEB-INF/dispatcher-servlet.xmld.Application-context.xml2.Written Result(10x2)(1)public class Test{public static void main (String []args){try{int a,b;b=0;a-5/b;System.oyt.println("A");}catch(ArithmetcException e){System.out.println("B");}finally{Thread t=new Thread.currentThread();System.out.println(t.isAlive());System.out.println(t);}}}output result:(2)webpage URL: http://localhost:8080/news/main/list.jspSystem.out.println(request.getRequestPath());System.out.println(request.getServletPath ());System.out.println(request.getRequestURL());System.out.println(request.getRealPath(“/”));output result:3.Programming (20x2)Note:Optimize for speed and space DO NOT use API or libraries(1)Given two binary trees(二叉树),please determine whether two binary trees areidentical(完全相同). Refers to the tree structure is the same,and the value atcorresponding(对应的)location node is same too.(2)You are given two sorted arrays(排序好的数组),A and B.A has a large enoughbuffer(缓冲空间) at the end to save B . Write a method to merge B into A in Sorted order.。

ibm英语面试常见问题汇总

ibm英语面试常见问题汇总

ibm英语面试常见问题汇总ibm英语常见问题汇总(一)1.what is oracle.2.what is major differenece oracle8i and oracle9i.4.tell me some thing ur self.5.please tell me about oops.6.what is single inheritance.7.what is multiple inheritance.8.can java support multiple inheritance.9.what is interface.10.what is differenec between abstract class and interface.11.how to u prove that abstrace class cannot instantiate directly.12.what is differenece between string and stringbuffer.13.what is immutable14.how to write a program using sort program.15 how to write a program using unsort program.16.what is legacy.17.what is legacy api18.what is legacy interface.19.what is main difference hashmap and hastable20.what is main difference between arraylist and vector.21.what is struts framework.22.what are distributed techonologies.23.what is advantage and disadvantage of distributed techonologies.24.what is main difference between jsp and servlets.25.what is difference between procedure and functions.26.what is jdbc.27.what are type of drivers.28.what is type 4 driver.29.how to collect requuirements form u r client.30.which process use in ur project.ibm常见问题汇总(二)面试过程早上6点我就起来,7点出发,7:40左右到达使馆后门。

2023年IBM面试题及答案

2023年IBM面试题及答案

2023年IBM面试题及答案试题1:为什么你是这份工作的最正确人选?A、我干过不少这种职位,我的阅历将帮忙我胜任这一岗位。

B、我干什么都很精彩。

C、通过我们之间的沟通,我觉得这里是一个很好的工作地点。

D、你们需要可以生产出“效益”的人,而我的背景和阅历可以证明我的力量,例如:我曾经例题1:A、错误。

阅历是好的,但“许多一样职位”或许更让人觉得你并不总能保证很好的表现。

B、错误。

很自信的答复,但是过于高傲。

对于这种问题适宜的案例和虚心更重要。

C、错误。

这对雇主来说是一个很好的恭维,但是过于自我为中心了,答非所问。

应当指出你能为雇主供应什么。

D、最正确答案。

回答下列问题并供应案例支持在这里是最好的策略。

试题2:描述一下你自己。

A、列举自己的个人经受、业余兴趣爱好等。

B、大肆宣扬一下自己良好的品德和工作习惯。

C、列举3个自己的性格与成就的详细案例。

例题2: A、错误。

一般来说,聘请者更想通过这个问题了解你的习惯和行为方式。

个人的具体资料对他们来说没有任何意义。

B、自大并不能让你从竞争中脱颖而出。

答复完问题以后,你必需得到聘请者的信任并让他/她记住你。

这样的宣扬并不胜利。

C、最正确答案。

案例是你力量最好的证据。

一个清楚简明有力的案例能让你从人群中脱颖而出,给聘请者留下好印象。

因此,在面试以前最好考虑一下这份工作需要自己什么样的品质,做好预备。

假如你被问到一个推断性问题,例如:你有没有制造性?你能不能在压力下工作?最好的答案是什么?a) 答复“是”或“否”。

b) 答复“是”或“否”,并给出一个详细的例子。

c) 答复“是”或“否”,并做进一步的解释。

a) 错误。

没有支持的答案总是显得不行信。

即使是这种只需要答复“是”或“否”的问题也需要详细的解释。

b) 最正确答案。

一个简短的详细安全可以很好地支持你的答案,同时,也能说明你的自信和真诚。

c) 错误。

详细案例可以更简洁有力地说明你的力量。

在解释的时候,人们往往会跑题,夹杂不清。

IBM英语面试问题.doc

IBM英语面试问题.doc

IBM英语面试问题IBM英语面试问题篇11.what is oracle.2.what is major differenece oracle8i and oracle9i.4.tell me some thing ur self.5.please tell me about oops.6.what is single inheritance.7.what is multiple inheritance.8.can java support multiple inheritance.9.what is interface.10.what is differenec between abstract class and interface.11.how to u prove that abstrace class cannot instantiate directly.12.what is differenece between string and stringbuffer.13.what is immutable14.how to write a program using sort program.15 how to write a program using unsort program.16.what is legacy.17.what is legacy api18.what is main difference hashmap and hastable19.what is main difference between arraylist and vector.20.what are distributed techonologies.21.what is difference between procedure and functions.22.what is jdbc.23.what are type of drivers.24.what is platfrom independent25.what is awt and swing.26.what is major concepts in oops.27.why u choose mvc-2 architecture.28.what is implicit object.29.how many implicit objects in jspIBM英语面试问题篇21. Oracle is an RDBMS product with DDL and DML from a company called Oracle Inc.2. Difference between 8i and 9i is given in the Oracle site3. Question not available4. Something5. oops is Object Oriented Programming6.one class is inherited by only other one class7.One class inheriting more than one class at atime8.No9.Interface has only method declarations but no defn10.In abstract class some methods may contain definition,but in interface every method should be abstract11.As they dont have constructor they cant be instantiated12.Strings are immutable where as string buffer can be modified13.Which cant be changed14-15Both can be done using javascriptThis is for Sortfunction SelectTextSort(obj) { // sort by textvar N=obj.options.length;for (var i=0;ifor (var j=i+1;jif ( obj.options[i].text obj.options[j].text ) {。

Java English Questions (Java外企面试经典完整题目和答案)

Java English Questions (Java外企面试经典完整题目和答案)

115questions total,not for the weak.Covers everything from basics to JDBC connectivity, AWT and JSP.What is the difference between procedural and object-oriented programs?-a)In procedural program,programming logic follows certain procedures and the instructions are executed one after another.In OOP program,unit of program is object,which is nothing but combination of data and code.b)In procedural program,data is exposed to the whole program whereas in OOPs program,it is accessible with in the object and which in turn assures the security of the code.What are Encapsulation,Inheritance and Polymorphism?-Encapsulation is the mechanism that binds together code and data it manipulates and keeps both safe from outside interference and misuse.Inheritance is the process by which one object acquires the properties of another object.Polymorphism is the feature that allows one interface to be used for general class actions.What is the difference between Assignment and Initialization?-Assignment can be done as many times as desired whereas initialization can be done only once.What is OOPs?-Object oriented programming organizes a program around its data,i.e.,objects and a set of well defined interfaces to that data.An object-oriented program can be characterized as data controlling access to code.What are Class,Constructor and Primitive data types?-Class is a template for multiple objects with similar features and it is a blue print for objects.It defines a type of object according to the data the object can hold and the operations the object can perform. Constructor is a special kind of method that determines how an object is initialized when created.Primitive data types are8types and they are:byte,short,int,long,float,double, boolean,char.What is an Object and how do you allocate memory to it?-Object is an instance of a class and it is a software unit that combines a structured set of data with a set of operations for inspecting and manipulating that data.When an object is created using new operator,memory is allocated to it.What is the difference between constructor and method?-Constructor will be automatically invoked when an object is created whereas method has to be called explicitly.What are methods and how are they defined?-Methods are functions that operate on instances of classes in which they are defined.Objects can communicate with each other using methods and can call methods in other classes.Method definition has four parts. They are name of the method,type of object or primitive type the method returns,a list ofmethod’’s signature is a combination of the parameters and the body of the method.A methodfirst three parts mentioned above.What is the use of bin and lib in JDK?-Bin contains all tools such as javac,appletviewer, awt tool,etc.,whereas lib contains API and all packages.What is casting?-Casting is used to convert the value of one type to another.How many ways can an argument be passed to a subroutine and explain them?-An argument can be passed in two ways.They are passing by value and passing by reference. Passing by value:This method copies the value of an argument into the formal parameter of the subroutine.Passing by reference:In this method,a reference to an argument(not the value of the argument)is passed to the parameter.What is the difference between an argument and a parameter?-While defining method,variables passed in the method are called parameters.While using those methods,values passed to those variables are called arguments.What are different types of access modifiers?-public:Any thing declared as public cancan’’t be seen outside be accessed from anywhere.private:Any thing declared as private canof its class.protected:Any thing declared as protected can be accessed by classes in the same package and subclasses in the other packages.default modifier:Can be accessed only to classes in the same package.What is final,finalize()and finally?-final:final keyword can be used for class,method and variables.A final class cannot be subclassed and it prevents other programmers from subclassing a secure class to invoke insecure methods.A final method cancan’’t be overridden.can’’t change from its initialized value.finalize():finalize()method is used A final variable canjust before an object is destroyed and can be called just prior to garbage collection. finally:finally,a key word used in exception handling,creates a block of code that will be executed after a try/catch block has completed and before the code following the try/catch block.The finally block will execute whether or not an exception is thrown.For example,if a method opens a file upon exit,then you will not want the code that closes the file to be bypassed by the exception-handling mechanism.This finally keyword is designed to address this contingency.What is UNICODE?-Unicode is used for internal representation of characters and strings and it uses16bits to represent each other.What is Garbage Collection and how to call it explicitly?-When an object is no longer referred to by any variable,java automatically reclaims memory used by that object.This is known as garbage collection.System.gc()method may be used to call it explicitly.What is finalize()method?-finalize()method is used just before an object is destroyed and can be called just prior to garbage collection.What are Transient and Volatile Modifiers?-Transient:The transient modifier appliesobject’’s Persistent state.Transient to variables only and it is not stored as part of its objectvariables are not serialized.Volatile:Volatile modifier applies to variables only and it tells the compiler that the variable modified by volatile can be changed unexpectedly by other parts of the program.What is method overloading and method overriding?-Method overloading:When a method in a class having the same method name with different arguments is said to be method overloading.Method overriding:When a method in a class having the same method name with same arguments is said to be method overriding.What is difference between overloading and overriding?-a)In overloading,there is arelationship between methods available in the same class whereas in overriding,there isrelationship between a superclass method and subclass method.b)Overloading does notblock inheritance from the superclass whereas overriding blocks inheritance from thesuperclass.c)In overloading,separate methods share the same name whereas inoverriding,subclass method replaces the superclass.d)Overloading must have differentmethod signatures whereas overriding must have same signature.What is meant by Inheritance and what are its advantages?-Inheritance is the processof inheriting all the features from a class.The advantages of inheritance are reusability ofcode and accessibility of variables and methods of the super class by subclasses.What is the difference between this()and super()?-this()can be used to invoke aconstructor of the same class whereas super()can be used to invoke a super classconstructor.What is the difference between superclass and subclass?-A super class is a class thatis inherited whereas sub class is a class that does the inheriting.What modifiers may be used with top-level class?-public,abstract and final can beused for top-level class.What are inner class and anonymous class?-Inner class:classes defined in otherclasses,including those defined in methods are called inner classes.An inner class canhave any accessibility including private.Anonymous class:Anonymous class is a classdefined inside a method without a name and is instantiated and declared in the sameplace and cannot have explicit constructors.What is a package?-A package is a collection of classes and interfaces that provides ahigh-level layer of access protection and name space management.What is a reflection package?ng.reflect package has the ability to analyzeitself in runtime.What is interface and its use?-Interface is similar to a class which may containmethod’’s signature only but not bodies and it is a formal set of method and constant methoddeclarations that must be defined by the class that implements it.Interfaces are useful for:a)Declaring methods that one or more classes are expected to implement b)Capturingsimilarities between unrelated classes without forcing a class relationship.c)Determiningobject’’s programming interface without revealing the actual body of the class.an objectWhat is an abstract class?-An abstract class is a class designed with implementationgaps for subclasses to fill in and is deliberately incomplete.What is the difference between Integer and int?-a)Integer is a class defined in theng package,whereas int is a primitive data type defined in the Java language itself.Java does not automatically convert from one to the other.b)Integer can be used as anargument for a method that requires an object,whereas int can be used for calculations.What is a cloneable interface and how many methods does it contain?-It is not havingany method because it is a TAGGED or MARKER interface.What is the difference between abstract class and interface?-a)All the methodsdeclared inside an interface are abstract whereas abstract class must have at least one abstract method and others may be concrete or abstract.b)In abstract class,key word abstract must be used for the methods whereas interface we need not use that keywordcan’’t have for the methods.c)Abstract class must have subclasses whereas interface can subclasses.Can you have an inner class inside a method and what variables can you access?-Yes, we can have an inner class inside a method and final variables can be accessed.What is the difference between String and String Buffer?-a)String objects are constants and immutable whereas StringBuffer objects are not.b)String class supports constant strings whereas StringBuffer class supports growable and modifiable strings.What is the difference between Array and vector?-Array is a set of related data type and static whereas vector is a growable array of objects and dynamic.What is the difference between exception and error?-The exception class defines mild error conditions that your program encounters.Exceptions can occur when trying to open the file,which does not exist,the network connection is disrupted,operands being manipulated are out of prescribed ranges,the class file you are interested in loading is missing.The error class defines serious error conditions that you should not attempt to recover from.In most cases it is advisable to let the program terminate when such an error is encountered.What is the difference between process and thread?-Process is a program in execution whereas thread is a separate path of execution in a program.What is multithreading and what are the methods for inter-thread communication and what is the class in which these methods are defined?-Multithreading is the mechanism in which more than one thread run independent of each other within the process.wait(),notify()and notifyAll()methods can be used for inter-thread communication and these methods are in Object class.wait():When a thread executes a call to wait()method,it surrenders the object lock and enters into a waiting state.notify() or notifyAll():To remove a thread from the waiting state,some other thread must make a call to notify()or notifyAll()method on the same object.What is the class and interface in java to create thread and which is the most advantageous method?-Thread class and Runnable interface can be used to create threads and using Runnable interface is the most advantageous method to create threads because we need not extend thread class here.What are the states associated in the thread?-Thread contains ready,running,waiting and dead states.What is synchronization?-Synchronization is the mechanism that ensures that only one thread is accessed the resources at a time.When you will synchronize a piece of your code?-When you expect your code will be accessed by different threads and these threads may change a particular data causing data corruption.can’’t precede the What is deadlock?-When two threads are waiting each other and canprogram is said to be deadlock.What is daemon thread and which method is used to create the daemon thread?-Daemon thread is a low priority thread which runs intermittently in the back ground doing the garbage collection operation for the java runtime system.setDaemon method is used to create a daemon thread.Are there any global variables in Java,which can be accessed by other part of your program?-No,it is not the main method in which you define variables.Global variables is not possible because concept of encapsulation is eliminated here.What is an applet?-Applet is a dynamic and interactive program that runs inside a web page displayed by a java capable browser.What is the difference between applications and applets?-a)Application must be run on local machine whereas applet needs no explicit installation on local machine.b)Application must be run explicitly within a java-compatible virtual machine whereas applet loads and runs itself automatically in a java-enabled browser.d)Application starts execution with its main method whereas applet starts execution with its init method.e)Application can run with or without graphical user interface whereas applet must run within a graphical user interface.How does applet recognize the height and width?-Using getParameters()method.When do you use codebase in applet?-When the applet class file is not in the same directory,codebase is used.What is the lifecycle of an applet?-init()method-Can be called when an applet is first loaded start()method-Can be called each time an applet is started.paint()method-Can be called when the applet is minimized or maximized.stop()method-Can be used whenapplet’’s page.destroy()method-Can be called when the the browser moves off the appletbrowser is finished with the applet.How do you set security in applets?-using setSecurityManager()methodWhat is an event and what are the models available for event handling?-An event is an event object that describes a state of change in a source.In other words,event occurs when an action is generated,like pressing button,clicking mouse,selecting a list,etc. There are two types of models for handling events and they are:a)event-inheritance model and b)event-delegation modelWhat are the advantages of the model over the event-inheritance model?-The event-delegation model has two advantages over the event-inheritance model.They are: a)It enables event handling by objects other than the ones that generate the events.This allows a clean separation between a componentcomponent’’s design and its use.b)It performs much better in applications where many events are generated.This performance improvement is due to the fact that the event-delegation model does not have to be repeatedly process unhandled events as is the case of the event-inheritance.What is source and listener?-source:A source is an object that generates an event. This occurs when the internal state of that object changes in some way.listener:A listener is an object that is notified when an event occurs.It has two major requirements.First,itmust have been registered with one or more sources to receive notifications about specific types of events.Second,it must implement methods to receive and process these notifications.What is adapter class?-An adapter class provides an empty implementation of all methods in an event listener interface.Adapter classes are useful when you want to receive and process only some of the events that are handled by a particular event listener interface.You can define a new class to act listener by extending one of the adapter classes and implementing only those events in which you are interested.For example,the MouseMotionAdapter class has two methods,mouseDragged()and mouseMoved().The signatures of these empty are exactly as defined in the MouseMotionListener interface.If you are interested in only mouse drag events,then you could simply extend MouseMotionAdapter and implement mouseDragged().What is meant by controls and what are different types of controls in AWT?-Controls are components that allow a user to interact with your application and the AWT supports the following types of controls:Labels,Push Buttons,Check Boxes,Choice Lists,Lists, Scrollbars,Text Components.These controls are subclasses of Component.What is the difference between choice and list?-A Choice is displayed in a compact form that requires you to pull it down to see the list of available choices and only one item may be selected from a choice.A List may be displayed in such a way that several list items are visible and it supports the selection of one or more list items.What is the difference between scrollbar and scrollpane?-A Scrollbar is a Component, but not a Container whereas Scrollpane is a Conatiner and handles its own events and perform its own scrolling.What is a layout manager and what are different types of layout managers available in java AWT?-A layout manager is an object that is used to organize components in a container.The different layouts are available are FlowLayout,BorderLayout,CardLayout, GridLayout and GridBagLayout.How are the elements of different layouts organized?-FlowLayout:The elements of a FlowLayout are organized in a top to bottom,left to right fashion.BorderLayout:The elements of a BorderLayout are organized at the borders(North,South,East and West) and the center of a container.CardLayout:The elements of a CardLayout are stacked,on top of the other,like a deck of cards.GridLayout:The elements of a GridLayout are of equal size and are laid out using the square of a grid.GridBagLayout:The elements of a GridBagLayout are organized according to a grid.However,the elements are of different size and may occupy more than one row or column of the grid.In addition,the rows and columns may have different sizes.Which containers use a Border layout as their default layout?-Window,Frame and Dialog classes use a BorderLayout as their layout.Which containers use a Flow layout as their default layout?-Panel and Applet classes use the FlowLayout as their default layout.What are wrapper classes?-Wrapper classes are classes that allow primitive types tobe accessed as objects.What are Vector,Hashtable,LinkedList and Enumeration?-Vector:The Vector class provides the capability to implement a growable array of objects.Hashtable:The Hashtable class implements a Hashtable data structure.A Hashtable indexes and storesobject’’s keys.Hash codes are integer objects in a dictionary using hash codes as the objectvalues that identify objects.LinkedList:Removing or inserting elements in the middle of an array can be done using LinkedList.A LinkedList stores each object in a separate link whereas an array stores object references in consecutive locations.Enumeration:An object that implements the Enumeration interface generates a series of elements,one at a time.It has two methods,namely hasMoreElements()and nextElement(). HasMoreElemnts()tests if this enumeration has more elements and nextElement method returns successive elements of the series.What is the difference between set and list?-Set stores elements in an unordered way but does not contain duplicate elements,whereas list stores elements in an ordered way but may contain duplicate elements.What is a stream and what are the types of Streams and classes of the Streams?-A Stream is an abstraction that either produces or consumes information.There are two types of Streams and they are:Byte Streams:Provide a convenient means for handling input and output of bytes.Character Streams:Provide a convenient means for handling input&output of characters.Byte Streams classes:Are defined by using two abstract classes,namely InputStream and OutputStream.Character Streams classes:Are defined by using two abstract classes,namely Reader and Writer.What is the difference between Reader/Writer and InputStream/Output Stream?-The Reader/Writer class is character-oriented and the InputStream/OutputStream class is byte-oriented.What is an I/O filter?-An I/O filter is an object that reads from one stream and writes to another,usually altering the data in some way as it is passed from one stream to another.What is serialization and deserialization?-Serialization is the process of writing the state of an object to a byte stream.Deserialization is the process of restoring these objects.What is JDBC?-JDBC is a set of Java API for executing SQL statements.This API consists of a set of classes and interfaces to enable programs to write pure Java Database applications.What are drivers available?-a)JDBC-ODBC Bridge driver b)Native API Partly-Java driver c)JDBC-Net Pure Java driver d)Native-Protocol Pure Java driverWhat is the difference between JDBC and ODBC?-a)OBDC is for Microsoft and JDBCcan’’t be directly used with Java because it uses a C is for Java applications.b)ODBC caninterface.c)ODBC makes use of pointers which have been removed totally from Java.d) ODBC mixes simple and advanced features together and has complex options for simple queries.But JDBC is designed to keep things simple while allowing advanced capabilitieswhen required.e)ODBC requires manual installation of the ODBC driver manager and driver on all client machines.JDBC drivers are written in Java and JDBC code is automatically installable,secure,and portable on all platforms.f)JDBC API is a natural Java interface and is built on ODBC.JDBC retains some of the basic features of ODBC.What are the types of JDBC Driver Models and explain them?-There are two types of JDBC Driver Models and they are:a)Two tier model and b)Three tier model Two tier model:In this model,Java applications interact directly with the database.A JDBC driver is required to communicate with the particular database management system that is being accessed.SQL statements are sent to the database and the results are given to user.This model is referred to as client/server configuration where user is the client and the machine that has the database is called as the server.Three tier model:A middle tier is introduced in this model.The functions of this model are:a)Collection of SQL statements from the client and handing it over to the database,b)Receiving results from database to the client and c)Maintaining control over accessing and updating of the above.What are the steps involved for making a connection with a database or how do you connect to a database?a)Loading the driver:To load the driver,Class.forName()methodJdbcOdbcDriver””);When the driver is loaded,it forName(””sun.jdbc.odbc.JdbcOdbcDriveris used.Class.forName(registers itself with the java.sql.DriverManager class as an available database driver.b) Making a connection with database:To open a connection to a given database, DriverManager.getConnection()method is used.Connection con=DriverManager.user””,“passwordpassword””);c)Executing SQL statements: getConnection(”jdbc:odbc:somedbjdbc:odbc:somedb””,“userTo execute a SQL query,java.sql.statements class is used.createStatement()method of Connection to obtain a new Statement object.Statement stmt=con.createStatement();A query that returns data can be executed using the executeQuery()method of Statement. This method executes the statement and returns a java.sql.ResultSet that encapsulates the retrieved data:ResultSet rs=stmt.executeQuery(table””);d)executeQuery(””SELECT*FROM some table Process the results:ResultSet returns one row at a time.Next()method of ResultSet object can be called to move to the next row.The getString()and getObject()methods aregetString(””eventevent””); used for retrieving column values:while(rs.next()){String event=rs.getString(getObject(””countcount””);Object count=(Integer)rs.getObject(What type of driver did you use in project?-JDBC-ODBC Bridge driver(is a driver that uses native(C language)libraries and makes calls to an existing ODBC driver to access a database engine).What are the types of statements in JDBC?-Statement:to be used createStatement() method for executing single SQL statement PreparedStatement—To be used preparedStatement()method for executing same SQL statement over and over. CallableStatement—To be used prepareCall()method for multiple SQL statements over and over.What is stored procedure?-Stored procedure is a group of SQL statements that forms a logical unit and performs a particular task.Stored Procedures are used to encapsulate a set of operations or queries to execute on database.Stored procedures can be compiledand executed with different parameters and results and may have any combination of input/output parameters.How to create and call stored procedures?-To create stored procedures:Create procedure procedurename(specify in,out and in out parameters)BEGIN Any multiple SQLprepareCall(””statement;END;To call stored procedures:CallableStatement csmt=con.prepareCall( name(?,?)}””);csmt.registerOutParameter(column no.,data type);csmt. {call procedure name(?,?)}setInt(column no.,column name)csmt.execute();What is servlet?-Servlets are modules that extend request/response-oriented servers, such as java-enabled web servers.For example,a servlet might be responsible for taking data in an HTML order-entry form and applying the business logic used to update a company’’s order database.companyWhat are the classes and interfaces for servlets?-There are two packages in servlets and they are javax.servlet andWhat is the difference between an applet and a servlet?-a)Servlets are to servers what applets are to browsers.b)Applets must have graphical user interfaces whereas servlets have no graphical user interfaces.What is the difference between doPost and doGet methods?-a)doGet()method is used to get information,while doPost()method is used for posting information.b)doGet() can’’t send large amount of information and is limited to240-255characters. requests canHowever,doPost()requests passes all of its data,of unlimited length.c)A doGet()request is appended to the request URL in a query string and this allows the exchange is visible to the client,whereas a doPost()request passes directly over the socket connection as part of its HTTP request body and the exchange are invisible to the client.What is the life cycle of a servlet?-Each Servlet has the same life cycle:a)A server loads and initializes the servlet by init()method.b)The servlet handles zero or more clientclient’’s requests through service()method.c)The server removes the servlet through destroy()method.Who is loading the init()method of servlet?-Web serverWhat are the different servers available for developing and deploying Servlets?-a) Java Web Server b)JRun g)Apache Server h)Netscape Information Server i)Web Logic How many ways can we track client and what are they?-The servlet API provides two ways to track client state and they are:a)Using Session tracking and b)Using Cookies.What is session tracking and how do you track a user session in servlets?-Session tracking is a mechanism that servlets use to maintain state about a series requests from the same user across some period of time.The methods used for session tracking are:a) User Authentication-occurs when a web server restricts access to some of its resources to only those clients that log in using a recognized username and password.b)Hidden formclient’’s browser. fields-fields are added to an HTML form that are not displayed in the clientWhen the form containing the fields is submitted,the fields are sent back to the server.c) URL rewriting-every URL that the user clicks on is dynamically modified or rewritten to include extra information.The extra information can be in the form of extra path。

ibm英语面试常见问题2

ibm英语面试常见问题2

ibm英语面试常见问题(2)ibm英语面试常见问题精选Q:Give me a summary of your current job description. (对你目前的工作,能否做个概括的说明。

)A:I have been working as a puter programmer for five years. To be specific, I do system analysis, trouble shooting and provide software support. (我干了五年的电脑程序员。

具体地说,我做系统分析,解决问题以及软件供给方面的支持。

)Q:Why did you leave your last job?(你为什么离职呢?)A:Well, I am hoping to get an offer of a better position. If opportunity knocks, I will take it.(我希望能获得一份更好的工作,如果时机来临,我会抓住。

)A:I feel I have reached the "glass ceiling" in my current job. / I feel there is no opportunity for advancement. (我觉得目前的工作,已经到达顶峰,即没有升迁时机。

)Q:How do you rate yourself as a professional?(你如何评估自己是位专业人员呢?)A:With my strong academic background, I am capable and petent. (凭借我良好的学术背景,我可以胜任自己的工作,而且我认为自己很有竞争力。

)A:With my teaching experience, I am confident that I can relate to students very well. (依我的教学经验,我相信能与学生相处的很好。

联想集团Java开发英文面试题

联想集团Java开发英文面试题
b=0;
a-5/b;
System.oyt.println("A");
}catch(ArithmetcException e){
System.out.println("B");
}finally{
Thread t=new Thread.currentThread();
System.out.println(t.isAlive());
System.out.println(t);
}
}
}
output result:
(2)webpage URL:http://localhost:8080/news/main/list.jsp
System.out.println(request.getRequestPath());
System.out.letPath ());
e.final abstract void method(){ }
(4)Youwant a class to have access to member of another class in the same packagewhich is the most restrictive access modifier that will accomplish this objective?
6)
7)}
a. public folat getNum(){return 4.0f;}
b.public void getNum(){ }
c.public void getNum(double d){ }
d. public double getNum(float d){return4.0d;}
(8)What results from attempting to compile and run the following code?

java 英语面试题(各外企java英文面试题汇总-100问)

java 英语面试题(各外企java英文面试题汇总-100问)

java 英语面试题(各外企java英文面试题汇总-100问)Question:What is the difference between an Interface and an Abstract class?Question: What is the purpose of garbage collection in Java, and when is it used?Question: Describe synchronization in respect to multithreading.Question: Explain different way of using thread?Question: What are pass by reference and passby value?Question: What is HashMap and Map?Question: Difference between HashMap and HashTable?Question: Difference between Vector and ArrayList?Question: Difference between Swing and Awt?Question: What is the difference between a constructor and a method?Question: What is an Iterator?Question: State the significance of public, private, protected, default modifiers both singly and in combination and state the effect of package relationships on declared items qualified by these modifiers.Question: What is an abstract class?Question: What is static in java?Question:What is final?Question: What if the main method is declared as private?Question: What if the static modifier is removed from the signature of the main method?Question: What if I write static public void instead of public static void?Question: What if I do not provide the String array as the argument to the method?Question: What is the first argument of the String array in main method?Question: If I do not provide any arguments on the command line, then the String array of Main method will be empty or null?Question: How can one prove that the array is not null but empty using one line of code?Question: What environment variables do I need to set on my machine in order to be able to run Java programs?Question: Can an application have multiple classes having main method?Question: Can I have multiple main methods in the same class?Question: Do I need to import ng package any time? Why ?Question: Can I import same package/class twice? Will the JVM load the package twice at runtime?Question: What are Checked and UnChecked Exception?Question: What is Overriding?Question: What are different types of inner classes?Question: Are the imports checked for validity at compile time? e.g. will the code containing an import such as ng.ABCD compile?Question: Does importing a package imports the subpackages as well? e.g. Does importing com.MyTest.* also import com.MyTest.UnitTests.*?Question: What is the difference between declaring a variable and defining a variable?Question: What is the default value of an object reference declared as an instance variable?Question: Can a top level class be private or protected?Question: What type of parameter passing does Java support?Question: Primitive data types are passed by reference or pass by value?Question: Objects are passed by value or by reference?Question: What is serialization?Question: How do I serialize an object to a file?Question: Which methods of Serializable interface should I implement?Question: How can I customize the seralization process? i.e. how can one have a control over the serialization process?Question: What is the common usage of serialization?Question: What is Externalizable interface?Question: When you serialize an object, what happens to the object references included in the object?Question: What one should take care of while serializing the object?Question: What happens to the static fields of a class during serialization?Question: Does Java provide any construct to find out the size of an object?Question: Give a simplest way to find out the time a method takes for execution without using any profiling tool?Question: What are wrapper classes?Question: Why do we need wrapper classes?Question: What are checked exceptions?Question: What are runtime exceptions?Question: What is the difference between error and an exception??Question: How to create custom exceptions?Question: If I want an object of my class to be thrown as an exception object, what should I do?Question: If my class already extends from some other class what should I do if I want an instance of my class to be thrown as an exception object?Question: How does an exception permeate through the code?Question: What are the different ways to handle exceptions?Question: What is the basic difference between the 2 approaches to exception handling...1> try catch block and 2> specifying the candidate exceptions in the throws clause?When should you use which approach?Question: Is it necessary that each try block must be followed by a catch block?Question: If I write return at the end of the try block, will the finally block still execute?Question: If I write System.exit (0); at the end of the try block, will the finally block still execute?Question: How are Observer and Observable used?Question: What is synchronization and why is it important?Question: How does Java handle integer overflows and underflows?Question: Does garbage collection guarantee that a program will not run out of memory?Question: What is the difference between preemptive scheduling and time slicing? Question: When a thread is created and started, what is its initial state? Question: What is the purpose of finalization?Question: What is the Locale class?Question: What is the difference between a while statement and a do statement? Question: What is the difference between static and non-static variables? Question: How are this() and super() used with constructors?Question: What are synchronized methods and synchronized statements?Question: What is daemon thread and which method is used to create the daemon thread? Question: Can applets communicate with each other?Question: What are the steps in the JDBC connection?Question: How does a try statement determine which catch clause should be used to handle an exception?Question: Is Empty .java file a valid source file?Question: Can a .java file contain more than one java classes?Question: Is String a primitive data type in Java?Question: Is main a keyword in Java?Question: Is next a keyword in Java?Question: Is delete a keyword in Java?Question: Is exit a keyword in Java?Question: What happens if you dont initialize an instance variable of any of the primitive types in Java?Question: What will be the initial value of an object reference which is defined as an instance variable?Question: What are the different scopes for Java variables?Question: What is the default value of the local variables?Question: How many objects are created in the following piece of code?MyClass c1, c2, c3;c1 = new MyClass ();c3 = new MyClass ();Question: Can a public class MyClass be defined in a source file named YourClass.java?Question: Can main method be declared final?Question: What will be the output of the following statement?System.out.println ("1" + 3);Question: What will be the default values of all the elements of an array defined as an instance variable?Question: Can an unreachable object become reachable again?Question: What method must be implemented by all threads?Question: What are synchronized methods and synchronized statements?Question: What is Externalizable?Question: What modifiers are allowed for methods in an Interface?Question: What are some alternatives to inheritance?Question: What does it mean that a method or field is "static"? ?Question: What is the difference between preemptive scheduling and time slicing? Question: What is the catch or declare rule for method declarations?。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

4.tell me some thing ur self.5.please tell me about oops.6.what is single inheritance.7.what is multiple inheritance.8.can java support multiple inheritance.9.what is interface.10.what is differenec between abstract class and interface.11.how to u prove that abstrace class cannot instantiate directly.12.what is differenece between string and stringbuffer.13.what is immutable14.how to write a program using sort program.15 how to write a program using unsort program.16.what is legacy.17.what is legacy api18.what is legacy interface.19.what is main difference hashmap and hastable20.what is main difference between arraylist and vector.21.what is struts framework.22.what are distributed techonologies.23.what is advantage and disadvantage of distributed techonologies.24.what is main difference between jsp and servlets.25.what is difference between procedure and functions.26.what is jdbc.27.what are type of drivers.28.what is type 4 driver.29.how to collect requuirements form u r client.30.which process use in ur project.31.what is deployment descriptor.32.what is heirarchy of files in struts.33.please draw struts frame wrok.34.please draw j2ee architecture.35.please draw mvc-2 architecture.36.please draw that how design op module.37.how to find a file on linux.38.how to configure weblogic8.1 on linux.39.why you use struts framework in ur project.40.what is platfrom independent41.what is awt and swing.42.what is heavy wieght components.43.what is feature of weblgoic8.1.44.why you choose application server on linux and database server on aix.45.please tell me about ur project.46.what is major concepts in oops.47.why u choose mvc-2 architecture.48.what is implicit object.49.how many implicit objects in jsp50.why choose weblogic8.1 other than any applicationserver.51.what is water fall model vs sdlc52.what is use of dataflowdiagrams53.wha t is ip in ur project.54.what about reception module1. Oracle is an RDBMS product with DDL and DML from a company called Oracle Inc.2. Difference between 8i and 9i is given in the Oracle site3. Question not available4. Something5. oops is Object Oriented Programming6.what is single inheritance.ansne class is inherited by only other one class7.what is multiple inheritance.ans:One class inheriting more than one class at atime8.can java support multiple inheritance.ans:No9.what is interface.ans:Interface has only method declarations but no defn10.what is differenec between abstract class and interface.ans:In abstract class some methods may contain definition,but in interface every method should be abstract 11.how to u prove that abstrace class cannot instantiate directly.ans:As they dont have constructor they cant be instantiated12.what is differenece between string and stringbuffer.ans:Strings are immutable where as string buffer can be modified13.what is immutableans:Which cant be changed14.how to write a program using sort program.15 how to write a program using unsort program.ans: Both can be done using javascriptThis is for Sortfunction SelectTextSort(obj) { // sort by textvar N=obj.options.length;for (var i=0;i<N-1;i++) {for (var j=i+1;j<N;j++) {if ( obj.options.text > obj.options[j].text ) {var i1= (obj.options.selected == true ) ? true : falsevar j1= (obj.options[j].selected == true ) ? true : falsevar q1 = obj.options[j].text;var q2 = obj.options[j].valobj.options.text = q1;obj.options.value = q2;obj.options.selected = (j1 && true ) ? true : falseobj.options[j].selected = (i1 && true ) ? true : false}}}return true}16.what is legacy.17.what is legacy api18.what is legacy interface.ans: legacy is something that is old in terms of technology/ system 19.what is main difference hashmap and hastableans:Hash table is synchronised20.what is main difference between arraylist and vector.ans:Vector is synchronised21.what is struts framework.22.what are distributed techonologies.distributed technologies means any technology / s/w program that are having many components in multiple environments that interact with each other depending on the functional requirements and design.23.what is advantage and disadvantage of distributed techonologies.overdependance on single platform / single language is avoided. Application can be built flexible to meet requirements. Division of labour is possible. Best of all the technologies and platforms can be optimally utilized. Complexity of requirements can be reduced.25.what is difference between procedure and functions.''ans:Fuctions can return value ,procedures cant return value26.what is jdbc.ans:Connecting to DB from java program requires JDBC27.what are type of drivers.type1,2,3,429.how to collect requuirements form u r client.is not a job of a technical person. It is better for a BA to do it.30.which process use in ur project.Generally u can say:Project related process: Analysis, Design, Sign-off Documents, Implementation, Integration, Testing, UATWork related process:Developer prepares the Unit Test CaseImplements Code, Performs TestSubmits Code through CVS / VSSSubmits documents along with Release Checklist to the tester / leader.31.what is deployment descriptor.ans:Which contains the infrnmation like which file to be used40.what is platfrom independentans:A language is said to be platform independent if it can be run on any machine with out modifying code41.what is awt and swing.ans:AWT are heavy weight components and swings are light weight components46.what is major concepts in oops.ans:Abstraction,polymorphism,encapsulation,inheritance47.why u choose mvc-2 architecture.ans:In MVC-2 controller is servlet rather than JSP which makes it efficient48.what is implicit object.ans:Implicit objects are a set of Java objects that the JSP Container makes available to developers in each page 49.how many implicit objects in jspansut,page,session,request,response,application,page context,config。

相关文档
最新文档