Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home4/vir007/public_html/geekmantra.com/contact/connect.php on line 2
Free Online Interview Freshers Tutorials,Interview Freshers Programming Tutorials,Interview Freshers notes
GeekMantra
Search Site

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home4/vir007/public_html/geekmantra.com/contact/connect.php on line 2
J2SE [Java 2 Standard Edition]
Core Java Introduction
Exception Handling
Collection & Util Classes
Multithreading
Input & Output Streams
Applet
Adwance Windows Toolkit (AWT)
Swings (Adwance GUI)
Event Handling
Java Networking
Remote Method Invocation (RMI)
Java Database Connectivity (JDBC)
J2EE [Java 2 Enterprise Edition]
Java 2 Enterprise Edition Intoduction (J2EE)
Server Side Programming (Servlet)
Java Server Pages (JSP)
Enterprise Java Bean
MVC Framework (Struts)
Advance Framework (Springs)
Object-relational mapping (Hibernate)
eXtensible Markup Language (XML)
Asynchronous JavaScript and XML (AJAX)
Miscellneous
Monthly News Letter
Free SCJP Samples
Interviews Questions For Freshers
Interviews Questions For Experinced
Most Visited Links
Most Freaky Links
Advertisements

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home4/vir007/public_html/geekmantra.com/contact/connect.php on line 2

Java Interviews Questions Freshers 1

1. What is the List interface?
Ans. The List interface provides support for ordered collections of objects.

2. What happens when you add a double value to a String?
Ans. The result is a String object.

3. What is the difference between an if statement and a switch statement?
Ans. The if statement is used to select among two alternatives. It uses a boolean expression to decide which alternative should be executed. The switch statement is used to select among multiple alternatives. It uses an int expression to determine which alternative should be executed.

4. How many bits are used to represent Unicode, ASCII, UTF-16, and UTF-8 characters?
Ans. Unicode requires 16 bits and ASCII require 7 bits. Although the ASCII character set uses only 7 bits, it is usually represented as 8 bits. UTF-8 represents characters using 8, 16, and 18 bit patterns. UTF-16 uses 16-bit and larger bit patterns.

5. What is the difference between yielding and sleeping?
Ans. When a task invokes its yield() method, it returns to the ready state. When a task invokes its sleep() method, it returns to the waiting state.

6. Which java.util classes and interfaces support event handling?
Ans. The EventObject class and the EventListener interface support event processing.

7. Is sizeof a keyword?
Ans. The sizeof operator is not a keyword.

8. What are wrapped classes?
Ans. Wrapped classes are classes that allow primitive types to be accessed as objects.

9. Does garbage collection guarantee that a program will not run out of memory?
Ans. Garbage collection does not guarantee that a program will not run out of memory. It is possible for programs to use up memory resources faster than they are garbage collected. It is also possible for programs to create objects that are not subject to garbage collection.

10. What restrictions are placed on the location of a package statement
Ans. within a source code file? A package statement must appear as the first line in a source code file (excluding blank lines and comments).

11. What is the immediate superclass of the Applet class?
Ans. Panel

12. Name three Component subclasses that support painting.
Ans. The Canvas, Frame, Panel, and Applet classes support painting.

Your Comments

neha says : Thanks lot of my friend who told me about www.geekmantra.com this is really a very good site.

Posted on :Tuesday, 24-June-2008
lokesh says : Yeah indeed , site is very good.. this section is very good for freshers who are looking for java carrier

Posted on :Wednesday, 18-June-2008

Java Interviews Questions Freshers 2

1. what  is a transient variable?
Ans. A transient variable is a variable that may not be serialized.

2. which containers use a border Layout as their default layout?
Ans. The window, Frame and Dialog classes use a border layout as their default layout.

3. Why do threads block on I/O?
Ans. Threads block on i/o (that is enters the waiting state) so that other threads may execute while the i/o Operation is performed.

4. How are Observer and Observable used?
Ans. Objects that subclass the Observable class maintain a list of observers. When an Observable object is updated it invokes the update() method of each of its observers to notify the observers that it has changed state. The Observer interface is implemented by objects that observe Observable objects.

5. Is null a keyword?
Ans. The null value is not a keyword.

6. What is the preferred size of a component?
Ans. The preferred size of a component is the minimum component size that will allow the component to display normally.

7. What`s new with the stop(), suspend() and resume() methods in JDK 1.2?
Ans. The stop(), suspend() and resume() methods have been deprecated in JDK 1.2.

8. Is null a keyword?
Ans. The null value is not a keyword.

9. What is the preferred size of a component?
Ans. The preferred size of a component is the minimum component size that will allow the component to display normally.

10. What method is used to specify a container`s layout?
Ans. The setLayout() method is used to specify a container`s layout.

11. Which containers use a FlowLayout as their default lyout?
Ans. The Panel and Applet classes use the FlowLayout as their default layout.

12. What state does a thread enter when it terminates its processing?
Ans. When a thread terminates its processing, it enters the dead state.

13. What is the Collections API?
Ans. The Collections API is a set of classes and interfaces that support operations on collections of objects.

14. Which characters may be used as the second character of an identifier, but not as the first character of an identifier?
Ans. The digits 0 through 9 may not be used as the first character of an identifier but they may be used after the first character of an identifier.

15. What is the List interface?
Ans. The List interface provides support for ordered collections of objects.

Your Comments

ram says : thanks to geekmantra , these are really a intreview cracker questions

Posted on :Thursday, 12-June-2008

Java Interviews Questions Freshers 3

1. What is clipping?
Ans. Clipping is the process of confining paint operations to a limited area or shape.

2. What is a native method?
Ans. A native method is a method that is implemented in a language other than Java.

3. Can a for statement loop indefinitely?
Ans. Yes, a for statement can loop indefinitely. For example, consider the following: for(;;);

4. What are order of precedence and associativity, and how are they used?
Ans. Order of precedence determines the order in which operators are evaluated in expressions. Associatity determines whether an expression is evaluated left-to-right or right-to-left

5. When a thread blocks on I/O, what state does it enter?
Ans. A thread enters the waiting state when it blocks on I/O.

6. To what value is a variable of the String type automatically initialized?
Ans. The default value of an String type is null.

7. How many times may an object`s finalize() method be invoked by the garbage collector?
Ans. An object`s finalize() method may only be invoked once by the garbage collector.

8. What is the purpose of the finally clause of a try-catch-finally statement?
Ans. The finally clause is used to provide the capability to execute code no matter whether or not an exception is thrown or caught.

9. What is the argument type of a program`s main() method?
Ans. A program`s main() method takes an argument of the String[] type.

10. Which Java operator is right associative?
Ans. The = operator is right associative.

11. What is the Locale class?
Ans. The Locale class is used to tailor program output to the conventions of a particular geographic, political, or cultural region.

12. Can a double value be cast to a byte?
Ans. Yes, a double value can be cast to a byte.

13. What is the difference between a break statement and a continue statement?
Ans. A break statement results in the termination of the statement to which it applies (switch, for, do, or while). A continue statement is used to end the current loop iteration and return control to the loop statement.

14. What must a class do to implement an interface?
Ans. It must provide all of the methods in the interface and identify the interface in its implements clause.