RSS
 
Keyword:
Questions: 7815 By Type : By Experience :

questions at    Tcs

  • Question:What is an Activity?... Normal
    Answer:A single screen in an application, with supporting Java code....
  • Question:How are escape characters used as attribute?... Normal
    Answer:Escape characters are preceded by double backslashes. For example, a newline character is ...
  • Question:What is adb?... Normal
    Answer:Adb is short for Android Debug Bridge. It allows developers the power to execute remote s...
  • Question:What is  the Android Application Architecture ? ... Normal
    Answer: Services like Network OperationIntent - To perform inter-communication between activitie...
  • Question:Where are lay out details placed? Why?... Normal
    Answer:Layout details are placed in XML files-XML-based layouts provide a consistent and standard...
  • Question:What is an Explicit Intent?... Normal
    Answer:-Explicit intent specifies the particular activity that should respond to the...
  • Question:How do I turn off, or reboot Android?... Normal
    Answer:In earlier releases, you had to pull the battery or press the reset button, in newer relea...
  • Question:What is a resource?... Normal
    Answer:    A user defined JSON, XML, bitmap, or other file, injected into the appl...
  • Question:What are the advantages of Android?... Normal
    Answer:The following are the advantages of Android:* The customer will be benefited from wide ran...
  • Question:What is adb?... Normal
    Answer:Adb is short for Android Debug Bridge. It allows developers the power to execute remote s...
  • Question:What does ADT stand for?... Normal
    Answer:ADT stands for Android Development Tools The Android SDK includes several tools and utilit...
  • Question:consider the following C code    main()    {     int... Multiple
    Options:    A)6    B)8    C)1    D)3...
  • Question:# define prod(a,b)=a*b    main()    {     int x=2; ... Multiple
    Options:    A)8    B)6    C)7    D)none...
  • Question:What is an Implicit Intent?... Normal
    Answer:  - In case of Implicit Intent, an intent is just declared. - It is for ...
  • Question:What is an Explicit Intent?... Normal
    Answer:- Explicit intent specifies the particular activity that should respond to th...
  • Question:The order of precedence of arithmetic operators in an expression can be    ... Multiple
    Options: A) [] B) () C) {} D) Any of the above...
  • Question:Write one statement equalent to the following two statements   x=sqr(a);   ret... Multiple
    Options: A)return(sqr(a)); B)printf("sqr(a)"); C)return(a*a*a); D)printf("%d",sqr(a));...
  • Question:What is activity?... Normal
    Answer:             A single screen i...
  • Question:How do you find any view element into your program?... Normal
    Answer:Findviewbyid...
  • Question:The hierarchy of the execution of logical operators is... Multiple
    Options: A) NOT AND OR B) AND OR NOT C) OR AND NOT D) OR NOT AND...
  • Question:The C language terminator is ... Multiple
    Options:   a.semicolon    b.colon   c.period   d.exclamation mark...
  • Question:Does importing a package imports the subpackages... Normal
    Answer:   No you will have to import the subpackages ...
  • Question:Are the imports checked for validity at compile ... Normal
    Answer:Yes the imports are checked for the semantic valid...
  • Question:Which three are valid declarations of a float?... Multiple
    Options: float f1 = -343; float f2 = 3.14; float f3 = 0x12345; float f4 = 42e7; float f5 = 20...
  • Question:Which three are valid declarations of a float?... Multiple
    Options: float f1 = -343; float f2 = 3.14; float f3 = 0x12345; float f4 = 42e7; float f5 = 20...
  • Question:Which is a valid keyword in java?... Multiple
    Options: A. interface B. string C. Float D. unsigned ...
  • Question: 3.  Which will legally declare, construct, and initialize an array? ... Multiple
    Options: A. int [] myList = {"1", "2", "3"}; B. int [] myList = (5, 8, 2); ...
  • Question:  Which four options describe the correct default values for array elements of the t... Multiple
    Options: A. 1, 2, 3, 4 B. 1, 3, 4, 5 C. 2, 4, 5, 6 D. 3, 4, 5, 6 ...
  • Question:What is the purpose of ftell ? ... Normal
    Answer:The function ftell() is used to get the current file represented by the file pointer. ftel...
  • Question:What is a random access file?... Normal
    Answer:A file can be accessed at random using fseek() function fseek(fp,position,origin); fp file...
  • Question:How are Structure passing and returning implemented by the complier?... Normal
    Answer:When structures are passed as argument to functions, the entire structure is typically pus...
  • Question:What is the difference between an enumeration and a set of pre-processor # defines?... Normal
    Answer:There is hardly any difference between the two, except that #defines has a global effect (...
  • Question:Can overloaded methods be override too?... Normal
    Answer:Yes, derived classes still can override the overloaded methods. Polymorphism can still ...
  • Question:What is Dynamic Binding?... Normal
    Answer:Method Overloading means to have two or more methods with same name in the same class wit...
  • Question:Explain the different forms of Polymorphism.... Normal
    Answer:There are two types of polymorphism one is Compile time polymorphism and the other is run ...
  • Question:What is the difference between abstraction and encapsulation?... Normal
    Answer: Abstraction focuses on the outside view of an object (i.e. the interface) Encapsulation ...
  • Question:Does garbage collection guarantee that a program... Normal
    Answer: Garbage collection does not guarantee that a prog...
  • Question:What is synchronization and why is it important?... Normal
    Answer:   With respect to multithreading, synchronization ...
  • Question:What is the difference between the Boolean & operator and the && operator?... Normal
    Answer: If an expression involving the Boolean & operator is evaluated, both operands are e...
  • Question:What is the difference between a break statement and a continue statement?... Normal
    Answer:A break statement results in the termination of the statement to which it applies (switch,...
  • Question:What is the difference between a while statement and a do while statement?... Normal
    Answer: A while statement checks at the beginning of a loop to see whether the next loop iterati...
  • Question:What is difference between Path and Classpath?... Normal
    Answer: Path and Classpath are operating system level environment variales. Path is used define...
  • Question:Explain Belady's Anomaly?... Normal
    Answer:Also called FIFO anomaly. Usually, on increasing the number of frames allocated to a proce...
  • Question:What is DRAM? In which form does it store data?... Normal
    Answer:DRAM or Dynamic Random Access memory stores data in the form of 0’s and 1’s. T...
  • Question:What is the difference between private, protected, and public?... Normal
    Answer:These keywords are for allowing privileges to components such as java methods and variable...
  • Question:What are the main components of .NET Framework?... Normal
    Answer:.NET Framework provides enormous advantages to software developers in comparison to the ad...
  • Question: What is .NET Framework?... Normal
    Answer:.NET Framework is a complete environment that allows developers to develop, run, and deplo...
  • Question:When does the compiler supply a default constructor for a class?... Normal
    Answer:The compiler supplies a default constructor for a class if no other constructors are provi...
  • Question:If a method is declared as protected, where may the method be accessed?... Normal
    Answer:A protected method may only be accessed by classes or interfaces of the same package or by...
  • Question:How to define a constant variable in Java?... Normal
    Answer:The variable should be declared as static and final. So only one copy of th...
  • Question:What is Downcasting ?... Normal
    Answer:Downcasting is the casting from a general to a more specific type, i.e. casting down the h...
  • Question:Why does Java not support operator overloading?... Normal
    Answer:Operator overloading makes the code very difficult to read and maintain. To maintain code ...
  • Question:What do you mean by platform independence?... Normal
    Answer: Platform independence means that we can write and compile the java code in one platfor...
  • Question: 1.  CORPULENT ... Multiple
    Options: A. Lean B. Gaunt C. Emaciated D. Obese ...
  • Question:How many five digit positive integers that are divisible by 3 can be formed using the digi... Multiple
    Options: (1) 15 (2) 96 (3) 216 (4) 120 (5) 625...
  • Question:1. Look at this series: 2, 1, (1/2), (1/4), ... What number should come next?... Multiple
    Options: A. (1/3) B. (1/8) C. (2/8) D. (1/16) ...
  • Question:How is final different from finally and finalize()?... Normal
    Answer:final is a modifier which can be applied to a class or a method or a variable. f...
  • Question:Can you give few examples of final classes defined in Java API?... Normal
    Answer:java.lang.String, java.lang.Math are final classes....
  • Question: How many ways are there to create object in java?... Normal
    Answer:There are 4 ways to create a object in java 1.Using new keyword 2.Using Class.forName() ...
  • Question:Why is an Interface be able to extend more than one Interface but a Class can't extend mo... Normal
    Answer:Basically Java doesn't allow multiple inheritance, so a Class is restricted to extend onl...
  • Question:Why is an Interface be able to extend more than one Interface but a Class can't extend mo... Normal
    Answer:Basically Java doesn't allow multiple inheritance, so a Class is restricted to extend onl...
  • Question:2) Why do you use Windows Installer?... Normal
    Answer:Sol:The Windows Installer deployment technique allows you to deploy Windows-based and Web ...
  • Question: Why is an Interface be able to extend more than one Interface but a Class can't ext... Normal
    Answer:Basically Java doesn't allow multiple inheritance, so a Class is restricted to extend onl...
  • Question:Look at this series: 21, 9, 21, 11, 21, 13, 21, ... What number should come next?... Multiple
    Options: A. 14 B. 15 C. 21 D. 23 ...
  • Question:abd,dgk,hms,mtb,sbl,-?... Multiple
    Options: ZKW...
  • Question:a,z,x,b,v,t,c,r,-?... Normal
    Answer:P,D...
  • Question:Look at this series: 22, 21, 23, 22, 24, 23, ... What number should come next?... Multiple
    Options: A. 22 B. 24 C. 25 D. 26 ...
  • Question:what is next B,E,H?... Normal
    Answer:K...
  • Question:Look at this series: 2, 1, (1/2), (1/4), ... What number should come next?... Multiple
    Options: A. (1/3) B. (1/8) C. (2/8) D. (1/16) ...
  • Question:What is the prime difference between While and Do While Loop ?... Normal
    Answer:Though while and do-while are loop statements, in Do While it is assured that the stateme...
  • Question: A C program is compiled into native (binary) code by the compiler. Similary what w... Normal
    Answer:    JAVA program will get compiled into bytecode instead of native (binary) co...
  • Question:What is the difference between a = ++b and a = b++ ?... Normal
    Answer:  The first statement a = ++b can be broken down into two statements b = b + 1 fol...
  • Question:Which ones are classes and which ones are interfaces? 1. InputStream, OutputStream ... Normal
    Answer:1. Abstract Class  2. Interface...
  • Question:What is the rule regarding overriding methods throwing exceptions?... Normal
    Answer:Overriding method can not throw more generic exception than base method....
  • Question:Member variables are resolved compiletime or runtime?... Normal
    Answer:Compile Time...
  • Question:Can we override variables?class S1{          publi... Normal
    Answer:Yes but variables when overridden shadows the super class variable.    ...
  • Question:If an overridden method calls super class method which access class member variable, which... Normal
    Answer:Methods access  variables only in the context  of the class they belong to. If s...
  • Question:Can we have static method in interface?... Normal
    Answer:All methods in an inter face  are implicitly  public, abstract and never static....
  • Question:Can an interface have variables? Can these variables be transient?... Normal
    Answer:All variables  in an interface  are implicitly static , public and final. They c...
  • Question:Can an interface be final?... Normal
    Answer:Interface cannot be declared final as they are implicitly abstract....
  • Question:Can a class implement two interfaces which has got methods with same name and signatures?... Normal
    Answer:Yes...
  • Question:Can a class implement two interfaces with same variable names?... Normal
    Answer:If both the interface have same variable  and the variable is not declared  in i...
  • Question:Nested classes can extend only the enclosing class and can not implement any interface? Tr... Normal
    Answer:False. Nested class can extend any  class or implement any interface....
  • Question:What are the different types of inner classes?... Normal
    Answer:An inner class is part of the implementation of its enclosing class (or classes). As such,...
  • Question:Which ones are classes and which ones are interfaces?... Normal
    Answer:a. Abstract Class    b. Interface...
  • Question:Does File class have any method to read or write content in a file? Yes/No... Normal
    Answer:No...
  • Question:Can inner class have static members? Yes/No... Normal
    Answer:No...
  • Question:Can we cast two derived class for each other, both having same parent class. Yes/No... Normal
    Answer:No...
  • Question:Array whether local or class  levels are always initialized. True/False?... Normal
    Answer:True...
  • Question:Can constructor throw exception?... Normal
    Answer:Yes. Constructor can throw exception....
  • Question:Can we declare derived class first and then base class in java?... Normal
    Answer:Yes....
  • Question:Dictionary is an interface or class?... Normal
    Answer:Dictionary is a class not an interface....
  • Question:Map implements collection. True/False?... Normal
    Answer:Map doesn't implement collection....
  • Question:Random access file extends from File. True/False?... Normal
    Answer:False, Random access file descends from object  and implements data input and data ou...
  • Question:What is the use of volatile variable?... Normal
    Answer:Volatile can be applied only  to variables. Not for static or  final. Declaring ...
  • Question:What is the use of transient variable? Can a transiant variable be static?... Normal
    Answer:Transient variables are not stored as  objects persistence state .Not serialized for ...
  • Question:Final variables declared without initialization can be initialized in static initializer (... Normal
    Answer:True but at most once....
  • Question:Local variables can  not be  declared static or final or transient .True/False?... Normal
    Answer:True...
  • Question:If you  have reference variable of parent class type and you assign a child class obj... Normal
    Answer:Parent...
  • Question:Determine the output: if(-0.0==0.0){    System.out.println("-0.0==0.0");... Normal
    Answer:-0.0==0.0...
  • Question:Determine the output: public class precedence{    public static void main(... Normal
    Answer:The value of i is 0The value of first element is 3The value of fourth element is 0...
  • Question:Determine the output: int y;final int z = y;b = z;   System.out.println("... Normal
    Answer:Compilation error as the value of z is not determined....
  • Question:Determine the output: float f = 6.0/2.0;System.out.println("The value of f is " + f);... Normal
    Answer:Compilation error as 6.0/2.0 evaluates to double....
  • Question:Determine the output: float f = 6/2; System.out.println("The value of f is " + f);... Normal
    Answer:The value of f is 3.0...
  • Question:Determine the output: float f = 1.3f;  System.out.println("The value of f is ... Normal
    Answer:The value of f is 1.3...
  • Question:Determine the output: float f = 1.3;  System.out.println("The value of f is "... Normal
    Answer:Compilation error...
  • Question:Determine the output: char c = 3;int a = 65;char d = a;System.out.println("The value of ... Normal
    Answer:Compilation error...
  • Question:Determine the output: byte b=10;b+=10;System.out.println("The value of b is " + b);... Normal
    Answer:The value of b is 20...
  • Question:Determine the output:byte b=10; b=b+10; System.out.println("The value of b is " + b)... Normal
    Answer:Compilation error as b=b+10 evaluates to int....
  • Question:Is the following statement correct: char ch = 'd';if(ch < 32.00){ }... Normal
    Answer:Correct...
  • Question:What will be output from the following statements: System.out.println(1+2+”3&rdqu... Normal
    Answer:1: 33     2:123...
  • Question:Which one is not correct... Multiple
    Options: A) x = = Float.NaNB) Float.isNan(x);C) Myobject .equals(float.NaN);D) None ...
  • Question:Which one throws arithmetic exception: int i = 100/0; float f = 100.00/0.0 ... Normal
    Answer:b float f = 100.00/0.0. Float division by zero returns NAN (not a number) instead of excep...
  • Question:Does the finalize method in subclass invoke finalize method in super class?... Normal
    Answer:Finalize is not implicitly chained. A finalize method in sub-class  should call final...
  • Question:Can finalize method be overloaded?... Normal
    Answer:Yes but only the following version is called by garbage collector:    prote...
  • Question:An object is resurrected by making other object refer to the dying object in finalize meth... Normal
    Answer:Resurrection can happen in finalize method which will prevent GC to reclaim the object mem...
  • Question:If there is an exception in finalize method, will the object be garbage collected?... Normal
    Answer:Exception in finalize method doesn't prevent GC....
  • Question:Can circular reference prevent an object to be GCed?... Normal
    Answer:No...
  • Question:GC is  a high  priority thread. True/False?... Normal
    Answer:False. GC is a low priority thread....
  • Question:A class without a method can be run by  JVM if its ancestor class has main. True/Fals... Normal
    Answer:True...
  • Question:public static final main(String[] args) {} is a valid method. True/False?... Normal
    Answer:True...
  • Question:public main(int number) { } is a valid method. True/False?... Normal
    Answer:True...
  • Question:Java supports both multi dimension and nested arrays. True/False?... Normal
    Answer:False. Java doesn't support multi dimension arrays. It supports only nested arrays....
  • Question:Which one of these primitive types are unsigned? ... Multiple
    Options: A) INT B) CHAR C) LONG D) DOUBLE...
  • Question:Which one of these statements are valid? Char     \u0061r  a&... Multiple
    Options: A) 1    B) 2      C) 3    ...
  • Question:MyClass.java and empty file is valid source file. True/False?... Normal
    Answer:True ...
  • Question:What will be the value of Point p after methods in a and b if the value before method call... Normal
    Answer:1. (100,200) 2. (700,800)  [Note: Primitive are passed by value in method parameter a...
  • Question:Is Array operations are faster or of Vector?... Normal
    Answer:Array...
  • Question:Which one is faster in java ? Math.max(a,b); (a>b)?a:b ... Normal
    Answer:(a>b)?a:b...
  • Question:Which one is faster in java ? for(int i = 100000; i > 0; i--) {} for(int i = 1; i &... Normal
    Answer:for(int i = 100000; i > 0; i--) {}...
  • Question:Write an nearest equivalent of size operator in C. Hint: Use Runtime class.... Normal
    Answer:Static Runtime runtime=Runtime.getRuntime(); long start,end; Object obj; runtime.gc();&nbs...
  • Question: The code in finally block will never get executed in the following program? True/False ... Normal
    Answer:True...
  • Question:What does it mean that a method or class is abstract?... Normal
    Answer:  An abstract class cannot be instantiated. Only its subclasses can be instantiated. ...
  • Question:What does it mean that a class or member is final?  ... Normal
    Answer:  A final class can no longer be subclassed. Mostly this is done for security reasons...
  • Question:Why are there no global variables in Java?... Normal
    Answer:  Global variables are considered bad form for a variety of reasons: · Adding...
  • Question:The code in a finally clause will never fail to execute, right?   ... Normal
    Answer:Using System.exit(1); in try block will not allow finally code to execute. ...
  • Question:  How can a servlet refresh automatically if some new data has entered the database?... Normal
    Answer:You can use a client-side Refresh or Server Push ...
  • Question:Can we use the constructor, instead of init(), to initialize servlet?   ... Normal
    Answer:  Yes , of course you can use the constructor instead of init(). There's nothing to ...
  • Question:  What is the output from System.out.println("Hello"+null);   ... Normal
    Answer:Hellonull ...
  • Question:  What is EJBDoclet?   ... Normal
    Answer:EJBDoclet is an open source JavaDoc doclet that generates a lot of the EJB related source ...
  • Question:What is the difference between a "Coarse Grained" Entity Bean and a "Fine Grained" Ent... Normal
    Answer:A 'fine grained' entity bean is pretty much directly mapped to one relational table, in ...
  • Question:  Is there any way to read values from an entity bean without locking it for the rest... Normal
    Answer:The only thing that comes to (my) mind is that you could write a 'group accessor' - a me...
  • Question:  Is it possible to share an HttpSession between a JSP and EJB? What happens when I c... Normal
    Answer:You can pass the HttpSession as parameter to an EJB method, only if all objects in session...
  • Question:Can a Session Bean be defined without ejbCreate() method? ... Normal
    Answer:  The ejbCreate() methods is part of the bean's lifecycle, so, the compiler will not...
  • Question:What is the advantage of puttting an Entity Bean instance from the "Ready State" to "Po... Normal
    Answer:  The idea of the "Pooled State" is to allow a container to maintain a pool of ent...
  • Question:The EJB container implements the EJBHome and EJBObject classes. For every request from a u... Normal
    Answer:  The EJB container maintains an instance pool. The container uses these instances fo...
  • Question:Does RMI-IIOP support code downloading for Java objects sent by value across an IIOP conne... Normal
    Answer:Yes. The JDK 1.2 support the dynamic class loading. ...
  • Question:Question What is a Message Driven Bean, What functions does a message driven bean have and... Normal
    Answer:Message driven beans are the latest addition to the family of component bean types defined...
  • Question:Question For Entity Beans, What happens to an instance field not mapped to any persistent ... Normal
    Answer:The specification infers that the container never serializes an instance of an Entity bean...
  • Question:Question Are we allowed to change the transaction isolation property in middle of a transa... Normal
    Answer:No. You cannot change the transaction isolation level in the middle of transaction. ...
  • Question:Should synchronization primitives be used on bean methods?   ... Normal
    Answer:No. The EJB specification specifically states that the enterprise bean is not allowed to u...
  • Question:Is method overloading allowed in EJB?   ... Normal
    Answer:Yes you can overload methods ...
  • Question:What is an EJB Context?   ... Normal
    Answer:EJBContext is an interface that is implemented by the container, and it is also a part of ...
  • Question:How is persistence implemented in enterprise beans? ... Normal
    Answer:Persistence in EJB is taken care of in two ways, depending on how you implement your beans...
  • Question:What is the difference between a Server, a Container, and a Connector?   ... Normal
    Answer:  An EJB server is an application, usually a product such as BEA WebLogic, that provi...
  • Question:How can I call one EJB from inside of another EJB?   ... Normal
    Answer:EJBs can be clients of other EJBs. It just works. Use JNDI to locate the Home Interface of...
  • Question:Why do we have a remove method in both EJBHome and EJBObject?... Normal
    Answer:With the EJBHome version of the remove, you are able to delete an entity bean without firs...
  • Question:  Why is ejbFindByPrimaryKey mandatory?   ... Normal
    Answer:An Entity Bean represents persistent data that is stored outside of the EJB Container/Serv...
  • Question:Is there any default cache management system with Entity beans ? In other words whether a ... Normal
    Answer:Caching data from a database inside the Application Server are what Entity EJB's are used...
  • Question:What is the difference between session and entity beans? When should I use one or the othe... Normal
    Answer:An entity bean represents persistent global data from the database; a session bean represe...
  • Question:What is the default transaction attribute for an EJB?   ... Normal
    Answer:There is no default transaction attribute for an EJB. Section 11.5 of EJB v1.1 spec says t...
  • Question:Is it possible to stop the execution of a method before completion in a SessionBean?  ... Normal
    Answer:Stopping the execution of a method inside a Session Bean is not possible without writing c...
  • Question:How can I implement a thread-safe JSP page?   ... Normal
    Answer:  You can make your JSPs thread-safe by having them implement the SingleThreadModel i...
  • Question:Is it legal to have static initializer blocks in EJB?   ... Normal
    Answer:  Although technically it is legal, static initializer blocks are used to execute som...
  • Question:  Is is possible for an EJB client to marshall an object of class java.lang.Class to ... Normal
    Answer:  Technically yes, spec. compliant NO! - The enterprise bean must not attempt to quer...
  • Question:Why can't I say just abs() or sin() instead of Math.abs() and Math.sin()?   ... Normal
    Answer:  The import statement does not bring methods into your local name space. It lets you...
  • Question:Whats the difference between notify() and notifyAll()?   ... Normal
    Answer:notify() is used to unblock one waiting thread; notifyAll() is used to unblock all of them...
  • Question:How can my application get to know when a HttpSession is removed?   ... Normal
    Answer:  Define a Class HttpSessionNotifier which implements HttpSessionBindingListener and ...
  • Question:How do I convert a numeric IP address like 192.18.97.39 into a hostname like java.sun.com?... Normal
    Answer:String hostname = InetAddress.getByName("192.18.97.39").getHostName(); ...
  • Question:What does it mean that a method or field is "static"?   ... Normal
    Answer:Static variables and methods are instantiated only once per class. In other words they are...
  • Question:Why isn't there operator overloading?   ... Normal
    Answer:  Because C++ has proven by example that operator overloading makes code almost impos...
  • Question:What are some alternatives to inheritance?   ... Normal
    Answer:Delegation is an alternative to inheritance. Delegation means that you include an instance...
  • Question:How can I send user authentication information while makingURLConnection?   ... Normal
    Answer:How can I send user authentication information while makingURLConnection?   ...
  • Question:Request parameter How to find whether a parameter exists in the request object?  &nbs... Normal
    Answer:  1.boolean hasFoo = !(request.getParameter("foo") == null || request.getParameter(...
  • Question:can the Kawa or any another J-editor export a .EXE file and to be has an install shield &n... Normal
    Answer:I didn't know i need an answer. ...
  • Question:Why bean must not implement the remote interface XARB   ... Normal
    Answer:Asking ...
  • Question:What is the fastest type of JDBC driver?   ... Normal
    Answer:  JDBC driver performance will depend on a number of issues: (a) the quality of the ...
  • Question:What is EJB QL?   ... Normal
    Answer:  EJB QL is a Query Language provided for navigation across a network of enterprise b...
  • Question:What is the role of serialization in EJB? ... Normal
    Answer:  A big part of EJB is that it is a framework for underlying RMI: remote method invoc...
  • Question:What is the advantage of using Entity bean for database operations, over directly using JD... Normal
    Answer:Entity Beans actually represents the data in a database. It is not that Entity Beans repla...
  • Question:What is clustering? What are the different algorithms used for clustering?  ... Normal
    Answer:Clustering is grouping machines together to transparantly provide enterprise services.The ...
  • Question:  Can I invoke Runtime.gc() in an EJB?   ... Normal
    Answer:You shouldn't. What will happen depends on the implementation, but the call will most lik...
  • Question:The EJB specification says that we cannot use Bean Managed Transaction in Entity Beans. Wh... Normal
    Answer:The short, practical answer is... because it makes your entity beans useless as a reusable...
  • Question:  Does RMI-IIOP support dynamic downloading of classes?   ... Normal
    Answer:No, RMI-IIOP doesn't support dynamic downloading of the classes as it is done with CORBA ...
  • Question:Question Can you control when passivation occurs? ... Normal
    Answer:The developer, according to the specification, cannot directly control when passivation oc...
  • Question:What is the difference between Java Beans and EJB?s?   ... Normal
    Answer:  Java Beans are client-side objects and EJBs are server side object, and they have c...
  • Question:  What is the need of Remote and Home interface. Why cant it be in one?   ... Normal
    Answer:In a few words, I would say that the main reason is because there is a clear division of r...
  • Question:What are the different identifier states of a Thread?... Normal
    Answer:  The different identifiers of a Thread are: R - Running or runnable thread S - Suspe...
  • Question:  How many types of protocol implementations does RMI have?... Normal
    Answer:RMI has at least three protocol implementations: Java Remote Method Protocol(JRMP), Intern...
  • Question:  What's new in the EJB 2.0 specification?   ... Normal
    Answer:  Following are the main features supported in EJB 2.0 * Integration of EJB with JMS ...
  • Question:Can the primary key in the entity bean be a Java primitive type such as int?   ... Normal
    Answer:The primary key can't be a primitive type--use the primitive wrapper classes, instead. Fo...
  • Question:I have created a remote reference to an EJB in FirstServlet. Can I put the reference in a ... Normal
    Answer:  Yes. The EJB client (in this case your servlet) acquires a remote reference to an E...
  • Question:How do the six transaction attributes map to isolation levels like "dirty read"? Will an... Normal
    Answer:  The Transaction Attributes in EJB do not map to the Transaction Isolation levels us...
  • Question:Is there a guarantee of uniqueness for entity beans?   ... Normal
    Answer:  There is no such guarantee. The server (or servers) can instantiate as many instanc...
  • Question:Can an EJB send asynchronous notifications to its clients?... Normal
    Answer:Asynchronous notification is a known hole in the first versions of the EJB spec. The recom...
  • Question:  I am developing a BMP Entity bean. I have noticed that whenever the create method i... Normal
    Answer:  This is the default behaviour for EJB. The specification states that ejbLoad() will...
  • Question:Is there any way to force an Entity Bean to store itself to the db? I don't wanna wait fo... Normal
    Answer:  Specify the transaction attribute of the bean as RequiresNew. Then as per section 1...
  • Question:  Is it possible to specify multiple JNDI names when deploying an EJB?   ... Normal
    Answer:No. To achieve this you have to deploy your EJB multiple times each specifying a different...
  • Question:Is it possible to write two EJB's that share the same Remote and Home interfaces, and hav... Normal
    Answer:It's certainly possible. In fact, there's an example that ships with the Inprise Applica...
  • Question:Are enterprise beans allowed to use Thread.sleep()?   ... Normal
    Answer:  Enterprise beans make use of the services provided by the EJB container, such ...
  • Question:  Why is XML such an important development?   ... Normal
    Answer:It removes two constraints which were holding back Web developments:<br> 1. § d...
  • Question:  I made my class Cloneable but I still get 'Can't access protected method clone. W... Normal
    Answer:Yeah, some of the Java books, in particular "The Java Programming Language", imply that ...
  • Question:How do I mix JSP and SSI #include?   ... Normal
    Answer:  If you're just including raw HTML, use the #include directive as usual inside your...
  • Question:  How do you delete a Cookie within a JSP?   ... Normal
    Answer:Cookie mycook = new Cookie("name","value"); response.addCookie(mycook); Cookie killmyc...
  • Question:How does JSP handle runtime exceptions?   ... Normal
    Answer:  Using errorPage attribute of page directive and also we need to specify isErrorPage...
  • Question:What is the difference between RequestDispatcher and sendRedirect?   ... Difference
    Answer:  RequestDispatcher: server-side redirect with request and response objects. sendRedi...
  • Question:What is the difference between directive include and jsp include?... Normal
    Answer:<%@ include> : Used to include static resources during translation time. : Used to i...
  • Question:How to pass information from JSP to included JSP?   ... Normal
    Answer:Using <%jsp:param> tag. ...
  • Question:What is the difference in using request.getRequestDispatcher() and context.getRequestDispa... Normal
    Answer:request.getRequestDispatcher(path): In order to create it we need to give the relative pat...
  • Question: What is the difference between the instanceof and getclass, these two are same or no... Normal
    Answer:instanceof is a operator, not a function while getClass is a method of java.lang.Object cl...
  • Question:what is the class variables ?... Normal
    Answer:When we create a number of objects of the same class, then each object will share a common...
  • Question:Read the following program: public class test {public static void main(String [] args) {&... Multiple
    Options: A. The output is ?Equal?   B. The output in ?Not Equal?   C. An error ...
  • Question:Describe the wrapper classes in Java.... Normal
    Answer:Wrapper class is wrapper around a primitive data type. An instance of a wrapper class cont...
  • Question:What are Access Specifiers available in Java?... Normal
    Answer:Access specifiers are keywords that determines the type of access to the member of a class...
  • Question: Explain the different forms of Polymorphism.... Normal
    Answer: From a practical programming viewpoint, polymorphism exists in three distinct forms ...
  • Question: Explain the Polymorphism principle.... Normal
    Answer:The meaning of Polymorphism is something like one name many forms. Polymorphism enables on...
  • Question: Explain the Inheritance principle.... Normal
    Answer: Inheritance is the process by which one object acquires the properties of another ob...
  • Question:Explain the Encapsulation principle.... Normal
    Answer:Encapsulation is a process of binding or wrapping the data and the codes that operates on ...
  • Question:Describe the principles of OOPS.... Normal
    Answer:There are three main principals of oops which are called Polymorphism, Inheritance and Enc...
  • Question:What is OOPS?... Normal
    Answer:OOP is the common abbreviation for Object-Oriented Programming.  ...
  • Question:How you can force the garbage collection?... Normal
    Answer:Garbage collection automatic process and can't be forced.  ...
  • Question:Explain garbage collection?... Normal
    Answer:Garbage collection is one of the most important feature of Java. Garbage collection is als...
  • Question: Explain the new Features of JDBC 2.0 Core API?... Normal
    Answer:The JDBC 2.0 API includes the complete JDBC API, which includes both core and Optional Pac...
  • Question:Explain the user defined Exceptions?... Normal
    Answer:User defined Exceptions are the separate Exception classes defined by the user for specifi...
  • Question:How to define an Interface?... Normal
    Answer:In Java Interface defines the methods but does not implement them. Interface can include c...
  • Question: How to define an Abstract class?... Normal
    Answer:A class containing abstract method is called Abstract class. An Abstract class can't be i...
  • Question:What is similarities/difference between an Abstract class and Interface?... Difference
    Answer:Differences are as follows: Interfaces provide a form of multiple inheritance. A class ...
  • Question:What is Collection API?... Normal
    Answer:The Collection API is a set of classes and interfaces that support operation on collection...
  • Question:What do you understand by Synchronization?... Normal
    Answer:Synchronization is a process of controlling the access of shared resources by the multip...
  • Question:Name the containers which uses Border Layout as their default layout?... Normal
    Answer:Containers which uses Border Layout as their default are: window, Frame and Dialog classes...
  • Question:What is transient variable?... Normal
    Answer:Transient variable can't be serialize. For example if a variable is declared as transient...
  • Question:  What is the difference between ServletContext and PageContext? ... Normal
    Answer:ServletContext: Gives the information about the container PageContext: Gives the informati...
  • Question:Can we implement an interface in a JSP?   ... Normal
    Answer:No...
  • Question:  How many types of JDBC Drivers are present and what are they? ... Normal
    Answer:There are 4 types of JDBC Drivers Type 1: JDBC-ODBC Bridge Driver Type 2: Native API Part...
  • Question:  What is a local, member and a class variable? ... Normal
    Answer:  Variables declared within a method are "local" variables. Variables declared wit...
  • Question:What modifiers are allowed for methods in an Interface?   ... Normal
    Answer:Only public and abstract modifiers are allowed for methods in interfaces. ...
  • Question:What is Externalizable?... Normal
    Answer:Externalizable is an Interface that extends Serializable Interface. And sends data into St...
  • Question:What is the query used to display all tables names in SQL Server (Query analyzer)?  &... Normal
    Answer:select * from information_schema.tables ...
  • Question:Can we define private and protected modifiers for variables in interfaces? ... Normal
    Answer:No...
  • Question:Can an Interface have an inner class? ... Normal
    Answer: Yes public interface abc {  static int i=0; void dd(); class a1 { a1() { ...
  • Question:Can an Interface be final?... Normal
    Answer:No...
  • Question:Can there be an abstract class with no abstract methods in it?   ... Normal
    Answer:Yes...
  • Question:Is Java a super set of JavaScript? ... Normal
    Answer:No. They are completely different. Some syntax may be similar....
  • Question:How you restrict a user to cut and paste from the html page? ... Normal
    Answer:Using javascript to lock keyboard keys. It is one of solutions...
  • Question:Does the code in finally block get executed if there is an exception and a retrun statemen... Normal
    Answer:If an exception occurs and there is a return statement in catch block, the finally block i...
  • Question:what is tunnelling? ... Normal
    Answer:Tunnelling is a route to somewhere. For example, RMI tunnelling is a way to make RMI appli...
  • Question:What is Serialization and deserialization? ... Normal
    Answer:Serialization is the process of writing the state of an object to a byte stream. Deserial...
  • Question:What are the Object and Class classes used for? ... Normal
    Answer:The Object class is the highest-level class in the Java class hierarchy. The Class class i...
  • Question:What is a Java package and how is it used? ... Normal
    Answer:A Java package is a naming context for classes and interfaces. A package is used to create...
  • Question:What is the difference between a Scrollbar and a ScrollPane? ... Difference
    Answer:A Scrollbar is a Component, but not a Container. A ScrollPane is a Container. A ScrollPane...
  • Question:What is the ResourceBundle class? ... Normal
    Answer:The ResourceBundle class is used to store locale-specific resources that can be loaded by ...
  • Question:What interface must an object implement before it can be written to a stream as an object?... Normal
    Answer:An object must implement the Serializable or Externalizable interface before it can be wri...
  • Question:What is the difference between the File and RandomAccessFile classes? ... Normal
    Answer:The File class encapsulates the files and directories of the local file system. The Random...
  • Question:What is the purpose of the enableEvents() method? ... Normal
    Answer:The enableEvents() method is used to enable an event for a particular object. Normally, an...
  • Question:What is the Set interface? ... Normal
    Answer:The Set interface provides methods for accessing the elements of a finite mathematical set...
  • Question:What an I/O filter? ... Normal
    Answer:An I/O filter is an object that reads from one stream and writes to another, usually alter...
  • Question:How is it possible for two String objects with identical values not to be equal under the ... Normal
    Answer:The == operator compares two objects to determine if they are the same object in memory. I...
  • Question:What class allows you to read objects directly from a stream? ... Normal
    Answer:The ObjectInputStream class supports the reading of objects from input streams. ...
  • Question:Name Container classes?... Normal
    Answer:Window, Frame, Dialog, FileDialog, Panel, Applet, or ScrollPane ...
  • Question:What is casting? ... Normal
    Answer:There are two types of casting, casting between primitive numeric types and casting betwee...
  • Question:What restrictions are placed on method overriding? ... Normal
    Answer:Overridden methods must have the same name, argument list, and return type. The overriding...
  • Question:What restrictions are placed on method overloading? ... Normal
    Answer:Two methods may not have the same name and argument list but different return types. ...
  • Question:How does multithreading take place on a computer with a single CPU? ... Normal
    Answer:The operating system's task scheduler allocates execution time to multiple tasks. By quic...
  • Question:What is the purpose of the File class? ... Normal
    Answer:The File class is used to create objects that provide access to the files and directories ...
  • Question:What is the difference between the paint() and repaint() methods? ... Difference
    Answer:The paint() method supports painting via a Graphics object. The repaint() method is used t...
  • Question:What is the difference between static and non-static variables? ... Normal
    Answer:A static variable is associated with the class as a whole rather than with specific instan...
  • Question:What are the problems faced by Java programmers who don't use layout managers? ... Normal
    Answer:Without layout managers, Java programmers are faced with determining how their GUI will be...
  • Question:What advantage do Java's layout managers provide over traditional windowing systems? ... Normal
    Answer:Java uses layout managers to lay out components in a consistent manner across all windowin...
  • Question:How are the elements of a GridBagLayout organized? ... Normal
    Answer:The elements of a GridBagLayout are organized according to a grid. However, the elements a...
  • Question:The Class class is used to obtain information about an object's design. ... Normal
    Answer:A component can handle its own events by implementing the required event-listener interfac...
  • Question:Name primitive Java types?... Normal
    Answer:The primitive types are byte, char, short, int, long, float, double, and boolean. ...
  • Question:Does a class inherit the constructors of its superclass? ... Normal
    Answer:A class does not inherit constructors from any of its superclasses. ...
  • Question:If a class is declared without any access modifiers, where may the class be accessed? ... Normal
    Answer:A class that is declared without any access modifiers is said to have package or friendly ...
  • Question:What classes of exceptions may be caught by a catch clause? ... Normal
    Answer:A catch clause can catch any exception that may be assigned to the Throwable type. This in...
  • Question:What is the difference between the Reader/Writer class hierarchy and the InputStream/Outpu... Normal
    Answer:The Reader/Writer class hierarchy is character-oriented, and the InputStream/OutputStream ...
  • Question:What happens when a thread cannot acquire a lock on an object? ... Normal
    Answer:If a thread attempts to execute a synchronized method or synchronized statement and is una...
  • Question:What is the difference between the Font and FontMetrics classes? ... Difference
    Answer:The FontMetrics class is used to define implementation-specific properties, such as ascent...
  • Question:What are peerless components? ... Normal
    Answer:The peerless components are called light weight components. ...
  • Question:What do heavy weight components mean? ... Normal
    Answer:Heavy weight components like Abstract Window Toolkit (AWT), depend on the local windowing ...
  • Question:What is the difference between a Window and a Frame? ... Difference
    Answer:The Frame class extends Window to define a main application window that can have a menu ba...
  • Question:When can an object reference be cast to an interface reference? ... Normal
    Answer:An object reference be cast to an interface reference when the object implements the refer...
  • Question:What is an object's lock and which object's have locks? ... Normal
    Answer:An object's lock is a mechanism that is used by multiple threads to obtain synchronized a...
  • Question:What is the difference between a static and a non-static inner class? ... Normal
    Answer:A non-static inner class may have object instances that are associated with instances of t...
  • Question:What are the high-level thread states? ... Normal
    Answer:The high-level thread states are ready, running, waiting, and dead. ...
  • Question:What is an abstract method? ... Normal
    Answer:An abstract method is a method whose implementation is deferred to a subclass. ...
  • Question:What is the purpose of the wait(), notify(), and notifyAll() methods? ... Normal
    Answer:The wait(),notify(), and notifyAll() methods are used to provide an efficient way for thre...
  • Question:What must a class do to implement an interface? ... Normal
    Answer:It must provide all of the methods in the interface and identify the interface in its impl...
  • Question:What is the Locale class? ... Normal
    Answer:The Locale class is used to tailor program output to the conventions of a particular geogr...
  • Question:What is the purpose of the finally clause of a try-catch-finally statement? ... Normal
    Answer:The finally clause is used to provide the capability to execute code no matter whether or ...
  • Question:What is the purpose of the System class? ... Normal
    Answer:The purpose of the System class is to provide access to system resources...
  • Question:What is the purpose of the Runtime class? ... Normal
    Answer:The purpose of the Runtime class is to provide access to the Java runtime system. ...
  • Question:What is the Properties class? ... Normal
    Answer:The properties class is a subclass of Hashtable that can be read from or written to a stre...
  • Question:What is the SimpleTimeZone class? ... Normal
    Answer:The SimpleTimeZone class provides support for a Gregorian calendar. ...
  • Question:What is the GregorianCalendar class? ... Normal
    Answer:The GregorianCalendar provides support for traditional Western calendars. ...
  • Question:What is the difference between the Boolean & operator and the && operator?&nbs... Normal
    Answer:If an expression involving the Boolean & operator is evaluated, both operands are eval...
  • Question:What invokes a thread's run() method? ... Normal
    Answer:After a thread is started, via its start() method or that of the Thread class, the JVM inv...
  • Question:Which class is the superclass for every class. ... Normal
    Answer:Object ...
  • Question:What is the purpose of finalization? ... Normal
    Answer:The purpose of finalization is to give an unreachable object the opportunity to perform an...
  • Question:Can an anonymous class be declared as implementing an interface and extending a class?&nbs... Normal
    Answer:An anonymous class may implement an interface or extend a superclass, but may not be decla...
  • Question:can you write a loop indefinitely? ... Normal
    Answer:for(;;)--for loop; while(true)--always true, etc.  ...
  • Question:What is a native method? ... Normal
    Answer:A native method is a method that is implemented in a language other than Java. ...
  • Question:Component subclasses that support painting. ... Normal
    Answer:The Canvas, Frame, Panel, and Applet classes support painting. ...
  • Question:What is the difference between preemptive scheduling and time slicing? ... Normal
    Answer:Under preemptive scheduling, the highest priority task executes until it enters the waitin...
  • Question:Does garbage collection guarantee that a program will not run out of memory? ... Normal
    Answer:No, it doesn't. It is possible for programs to use up memory resources faster than they a...
  • Question:What are wrapped classes? ... Normal
    Answer:Wrapped classes are classes that allow primitive types to be accessed as objects. ...
  • Question:Is sizeof a keyword? ... Normal
    Answer:The sizeof operator is not a keyword. ...
  • Question:What is the difference between yielding and sleeping? ... Normal
    Answer:When a task invokes its yield() method, it returns to the ready state. When a task invokes...
  • Question:How many bits are used to represent Unicode, ASCII, UTF-16, and UTF-8 characters? ... Normal
    Answer:Unicode requires 16 bits and ASCII require 7 bits. Although the ASCII character set uses o...
  • Question:What is an Iterator interface? ... Normal
    Answer:The Iterator interface is used to step through the elements of a Collection. ...
  • Question:If a method is declared as protected, where may the method be accessed? ... Others
    Answer:A protected method may only be accessed by classes or interfaces of the same package or by...
  • Question:What modifiers may be used with an inner class that is a member of an outer class? ... Normal
    Answer:A (non-local) inner class may be declared as public, protected, private, static, final, or...
  • Question:What is the Vector class? ... Normal
    Answer:The Vector class provides the capability to implement a growable array of objects  ...
  • Question:How does Java handle integer overflows and underflows?... Normal
    Answer:It uses those low order bytes of the result that can fit into the size of the type allowed...
  • Question:What is the List interface? ... Normal
    Answer:The List interface provides support for ordered collections of objects.  ...
  • Question:What is the Collections API? ... Normal
    Answer:The Collections API is a set of classes and interfaces that support operations on collecti...
  • Question:What state does a thread enter when it terminates its processing? ... Normal
    Answer:When a thread terminates its processing, it enters the dead state. ...
  • Question:Which containers use a FlowLayout as their default layout? ... Normal
    Answer:The Panel and Applet classes use the FlowLayout as their default layout.  ...
  • Question:What method is used to specify a container's layout? ... Normal
    Answer:The setLayout() method is used to specify a container's layout.  ...
  • Question:What is the preferred size of a component? ... Normal
    Answer:The preferred size of a component is the minimum component size that will allow the compon...
  • Question:What's new with the stop(), suspend() and resume() methods in JDK 1.2? ... Normal
    Answer:The stop(), suspend() and resume() methods have been deprecated in JDK 1.2. ...
  • Question:Can a lock be acquired on a class? ... Normal
    Answer:Yes, a lock can be acquired on a class. This lock is acquired on the class's Class object...
  • Question:What are three ways in which a thread can enter the waiting state? ... Normal
    Answer:A thread can enter the waiting state by invoking its sleep() method, by blocking on I/O, b...
  • Question:What are synchronized methods and synchronized statements? ... Normal
    Answer:Synchronized methods are methods that are used to control access to an object. A thread on...
  • Question:What is synchronization and why is it important? ... Normal
    Answer:With respect to multithreading, synchronization is the capability to control the access of...
  • Question:How are Observer and Observable used? ... Normal
    Answer:Objects that subclass the Observable class maintain a list of observers. When an Observabl...
  • Question:Which containers use a border layout as their default layout? ... Normal
    Answer:The window, Frame and Dialog classes use a border layout as their default layout. ...
  • Question:What is a transient variable? ... Normal
    Answer:A transient variable is a variable that may not be serialized. ...
  • Question:Is Java code slower than native code? ... Normal
    Answer:Not really. As a platform-independent environment, the Java platform can be a bit slower t...
  • Question:What is native code? ... Normal
    Answer:The native code is code that after you compile it, the compiled code runs on a specific ha...
  • Question:What is the package? ... Normal
    Answer:The package is a Java namespace or part of Java libraries. The Java API is grouped into li...
  • Question:What is the Java API? ... Normal
    Answer:The Java API is a large collection of ready-made software components that provide many use...
  • Question:is the Java Virtual Machine? ... Normal
    Answer:The Java Virtual Machine is a software that can be ported onto various hardware-based plat...
  • Question:What is the main difference between Java platform and other platforms? ... Difference
    Answer:The Java platform differs from most other platforms in that it's a software-only platform...
  • Question:What is a platform? ... Normal
    Answer:A platform is the hardware or software environment in which a program runs. Most platforms...
  • Question:Explain the String Constructors?... Normal
    Answer:Class String provides nine constructors for initializing String objects in a variety of wa...
  • Question:What is String class?... Normal
    Answer:Characters are the fundamental building blocks of Java source programs. In Java a string i...