Welcome to ActiveNET Ninja

Happy day

1.	What is right syntax of for loop declaration?
    a.	declaration ; initialization ; condition ; increment/decrement
    b.	declaration initialization ; condition ; increment/decrement
    c.	declaration initialization ; condition ; increment ; decrement
    d.	declaration ; initialization condition ; increment/decrement
2.	Which keyword skips the current iteration of a loop
    a.	break
    b.	return
    c.	continue
    d.	skip
3.	Which keyword terminates the loop iteration
    a.	break
    b.	return
    c.	continue
    d.	skip
4.	Which access specifier is applicable to all the class instance variables by default?
    a.	private
    b.	protected
    c.	public
    d.	default
5.	Which access specifier members/methods can be accessible by instance method of a class?
6.	Which access specifier members/methods a class method can accessible?
7.	Which modifier is prefixed to class by default?
8.	Which modifier is prefixed to interface by default?
9.	Which variables are need to be initialized at the time of declaration?
10.	Which value is assigned to static only variable by default?
11.	Which value is assigned to static final variable by default?
12.	Interface method need to declared as abstract. Say Y/N?
13.	Interface variables static transient by default. Say Y/N?
14.	Is local variables can be declared as final. Say Y/N?
15.	 Is local variables can be declared as static. Say Y/N?
16.	Can we apply access specifier to local variables. Say Y/N?
17.	Why some times super classes are declared as abstract?
18.	What if class is declared as final instead of declaring all its variables as final?
19.	What is Runtime Polymorphism?
20.	Which OOP features helps to implement Runtime Polymorphism?
21.	What if array is passed as argument in method, is it a pass-by-value or pass-by-reference?
22.	Why interface need be implemented to a class when there are no method implementations, only declaration exist?
23.	How to differentiate class instance variables from constructor parameters?
24.	Is default constructor is generated if we write a constructor?
25.	What values are initialized to class instance variables when we don’t initialize them in the constructor?
26.	What is the default access specifier applied to constructor if we don’t specify any access specifier to constructor?
27.	Is static inner class can contain both static and non-static methods?
28.	Is non-static inner class can contain both static and non-static methods?
29.	How to access non-static method of a static inner class?
30.	How to find the length of an array?
31.	How to find the length of an String?
32.	In pass by value is the passed value is changed when the argument in method changes?
33.	 In pass by reference is the passed reference is changed when the argument in method changes?
34.	Which variable will not have instance memory of a class?
35.	When static blocks executes?
36.	Is static method executes when class is loaded?
37.	What happens to statements written in a non-static block?
38.	What is the other name of a non-static block?
39.	What happens if class constructor is declared as private? 
40.	What happens if class constructor is declared as default?
41.	What happens if class constructor is declared as protected?
42.	What happens if class constructor is declared as public?
43.	Which are valid main() method?
    a.	public static void main(String[] rags)
    b.	static public void main(String[] rags)
    c.	public static void main(String rags)
    d.	public void main(String rags[])
    e.	public static void main(String[] rags[])
    f.	public static void main(String… rags)
    g.	public static void main(String rags…)
44.	What is the last index of a command line argument if the command line arguments are 10?
45.	What happens if we access more than the last index of a command line argument?
46.	Is Thread.sleep() methods reports checked exception or unchecked exception?
47.	What are Exception sub classes?
48.	What are RuntimeException sub classes?
49.	Which exceptions need to caught/declare to be thrown?
50.	What happens to the program execution if an unchecked exception raises and is not handled?
51.	How to terminate the program execution when exception is raised and caught?
52.	What happens to if double value is assigned to float?
53.	What are important methods in StringBuffer class?
54.	Is replace method exist in String, if exist what is it’s the parameter?
55.	 What happens in StringBuffer if the length increases more than its initial capacity?
56.	How to increase the capacity of a StringBuffer?
57.	What happens when setLength() method is called on StringBuffer?
58.	How to remove leading and trailing space in String?
59.	What happens if two String are compared using == operator?
60.	What happens if two String are compared using equals() method?
61.	Which operator is used to compare primitive datatype variables?
62.	When to use IS-A and when to use HAS-A?
63.	Is private, static can be applied on a variable? 
64.	Is default, static can be applied on variable? If so up-to which scope we can access it?
65.	Is protected, static can be applied on variable? If so up-to which scope we can access it?
66.	Is public, static can be applied on variable? If so up-to which scope we can access it?
67.	Why public class name and the .java file name must be same?
68.	Is private methods can be overridden?
69.	Is default methods can be overridden?
70.	Is protected methods can be overridden?
71.	Is public methods can be overridden?
72.	Write an example on abstraction to achieve Runtime Polymorphism?
73.	Tell me remembered java keywords.
74.	Tell me all access specifiers and access modifiers in a brief way.
75.	List Arithmetic Operators
76.	List Relational Operators
77.	List Bitwise Operators
78.	List Logical Operators
79.	List Assignment Operators
80.	List Prefix, Postfix Operators
81.	List Shift Operators
82.	Explain Ternary Operator
83.	Where you can use ‘case’ and ‘default’ keywords and tell one more keyword missing keyword?
84.	To implement Thread from which class/interface we need inherit from?
85.	Which method we need to implement to implement Thread logic?
86.	Which method delays thread execution for finite amount of time?
87.	How to name thread?
88.	How to retrieve thread name?
89.	How to set Thread priority?
90.	State Thread priorities?
91.	Which keyword is used to synchronize threads?
92.	How to apply thread synchronization?
93.	How to apply object synchronization?
94.	What yield method does?
95.	On what basis how many threads are required in our project?
96.	What is the essential method in InputStream?
97.	What is the essential method in OutputStream?
98.	Which InputStream class is used to read files?
99.	What InputStream class read() method returns?
100.	What indicates that the stream reaches to end?
101.	Which InputStream class reads line-by-line?
102.	Which InputStream class reads buffer-by-buffer?
103.	Which OutputStream sub class is used often to perform write operations?
104.	Which OutputStream class object exist in System class to perform write operations?
105.	 What is difference between InputStream, OutputStream classes and Reader, Writer?
106.	 Which class is used to perform Socket operations on server side?
107.	Which class is used to perform Socket operations on client side?
108.	Which method of ServerSocket class receives client’s socket request?
109.	Which classes are used to perform User Datagram Protocol operations?
110.	State the classes legacy API in java.utl package?
111.	What is the super class of Hashtable class?
112.	What is the super class of Properties class?
113.	What is the difference in Hashtable and Properties classes?
114.	List the methods of Vector class?
115.	Name the Vector sub class?
116.	Vector class performs FIFO/LIFO?
117.	Stack class performs FIFO/LIFO?
118.	Which method of Vector class returns all the elements?
119.	What is its return type?
120.	What is limitation of legacy classes?
121.	How util package classes are advantageous than Arrays?
122.	List the Vector class methods?
123.	List the Hashtable class methods?
124.	List the Properties class methods?
125.	What is super interface of Collection API?
126.	Which classes comes under Collection hierarchy?
127.	Which class in List interface is often used?
128.	Which method of List is used to return all the elements?
129.	Which interface is used to perform reverse iterate operations?
130.	What is the difference between List and Set
131.	Specify the difference in List and Set interface methods?
132.	Specify List sub classes?
133.	 Specify Set sub classes?
134.	Which Set classes performs unique-no order, unique-given order, unique-natural order?
135.	What are Map sub classes?
136.	Which Map classes performs unique-no order, unique-given order, unique-natural order?
137.	Which sub classes can be added to TreeSet and TreeMap?
138.	Difference between Comparable and Comparator interface methods?
139.	What is the difference between Legacy classes and Collection classes?
140.	Difference between peek() and poll() methods?
141.	Difference between peekLast() and pollLast() methods?
142.	To which class peek() and poll() methods belong to?
143.	What happens if Thread class run() method is called?
144.	Which method in Thread class starts run() method?
145.	What addShutdownHook(Thread) performs?
            
1.	What is the super interface to all the JDBC Drivers, specify the fully qualified name?
2.	What is the name of JDBC Type I Driver?
3.	What is the name of JDBC Type II Driver?
4.	What is the name of JDBC Type III Driver?
5.	What is the name of JDBC Type IV Driver?
6.	Who provided JDBC Type I Driver?
7.	Who provided JDBC Type II Driver? 
8.	Who provided JDBC Type III Driver? 
9.	Who provided JDBC Type IV Driver?
10.	Which statement we have to update in CLASSPATH for JDBC Type I Driver?
11.	Which statement we have to update in CLASSPATH for JDBC Type II Driver?
12.	Which statement we have to update in CLASSPATH for JDBC Type III Driver?
13.	Which statement we have to update in CLASSPATH for JDBC Type IV Driver?
14.	What is the Type I Driver class name (specify fully qualified class name)?
15.	What is the Type II Driver class name (specify fully qualified class name)?
16.	What is the Type III Driver class name (specify fully qualified class name)?
17.	What is the Type IV Driver class name (specify fully qualified class name)?
18.	What is the Type I Driver URL?
19.	What is the Type II Driver URL?
20.	What is the Type III Driver URL?
21.	What is the Type IV Driver URL?
22.	What are various interfaces exist in java.sql package?
23.	How many Statement interfaces exist in JDBC API?
24.	Specify their significance?
25.	Which operator is used as IN parameter in PreparedStatement?
26.	Write down the PreparedStatement creation syntax?
27.	Write down the CallableStatement creation syntax for calling procedure?
28.	Write down the CallableStatement creation syntax for calling function?
29.	How to register outparatemet ni CallableStatement
30.	Which method is called on CallableStatement to execute procedure/function?
31.	Which method is used to call DML statements on DB
32.	Which method is used to call DRL statements on DB
33.	What is return type of ResultSet?
34.	How to create scrollable resultset?
35.	Which methods exist in resultset to perform bi-directional fetch on DB?
36.	Which method is used to set autocommit false in JDBC?
37.	In which interface commit() method exist?
38.	Write down the syntax of creating CallableStatement for procedure calling?
39.	Write down the syntax of creating CallableStatement for function calling?
40.	How to register out parameters on CallableStatement object?
41.	Which method is to call on CallableStatement to call function/procedure?
42.	In which package JDBC API exist?
43.	Which software is required to obtain JDBC package?
44.	In which package Servlets API exist?
45.	Which software is required to obtain Servlets package
46.	What is the super interface from which user defined Servlet classes must inherit from?
47.	From which super classes user defined Servlet classes must inherit from?
48.	What are the lifecycle methods in Servlets API?
49.	Which execution model does Servlet follows?
50.	How safe the variable declared at class level in Servlet?
51.	What is the parameter of init() method?
52.	Which exception must be written in throws clause of init() method?
53.	What are the parameter of service() method?
54.	Which exceptions must be written in throws clause of service() method?
55.	When init() method executes?
56.	When service() method executes?
57.	When destroy() method executes?
58.	What are the 5 methods in Servlet interface?
59.	Which statement must be written in service() method to obtain PrintWriter object that writes output on browser?
60.	How to obtain ServletContext object in init() method?
61.	How to obtain ServletContext object in service() method?
62.	How to obtain HttpSession object in service() method?
63.	How to set the session time out in Servlet?
64.	What are the methods in ServletRequest, HttpSession and ServletContext objects to store, retrieve and remove variables/attributes?
65.	How to configure Servlet in web.xml?
66.	How to pass initialization parameters into Servlet?
67.	How to pass context parameters into Servlet?
68.	What is purpose of load-on-startup tag in web.xml
69.	How to specify welcome page in web.xml
70.	If no welcome page is specified in web.xml which file acts as a welcome page?
71.	What happens if load-on-startup is specified as 1 to one Servlet and 2 to another Servlet?
72.	What happens if negative value is specified in load-on-startup?
73.	Type the syntax to create .war extension file?
74.	How to read “HTML form” data in Servlet?
75.	What is difference between GET and POST method?
76.	Which class inherited Servlet maintains Session management?
77.	What is the purpose of RequestDispatcher interface?
78.	How to obtain RequestDispatcher object?
79.	What is the purpose of forward() and include()?
80.	What the parameters in forward() and include()?
81.	How to create RequestDispatcher object to call JSP from Servlet?
82.	How to create RequestDispatcher object to call another Servlet from Servlet?
83.	What is the difference between forward() and sendRedirect()?
84.	In which interface sendRedirect() method exist?
85.	What is Filter?
86.	In which package Filter interface exist?
87.	What are the lifecycle methods in Filter?
88.	How to configure Filter in web.xml?
89.	How many scripting tags exist in JSP and name them?
90.	How many directive elements exist in JSP and name them?
91.	How many standard action elements exist in JSP and name them?
92.	Which tags are used to include other pages in JSP?
93.	Which tag is used to forward other pages in JSP?
94.	How to increase JSP page buffer size in JSP?
95.	How to specify error page in JSP?
96.	Which tag and its sub tags are used to call Java Bean from JSP and to call its setter and getter methods?
97.	Which tag written code in JSP goes to out.println() statement?
98.	Which tag written code in JSP goes to _jspService() method?
                
1.	What is ORM?
2.	What is Hibernate?
3.	What are Hibernate features?
4.	List the files required to develop hibernate application?
5.	Name the hibernate properties required to configure JDBC driver properties?
6.	What is the importance of dialect?
7.	Which property in hibernate.cfg.xml file creates table automatically?
8.	Which property is used to configure hbm.xml file?
9.	Which property is used to configure Annotated Java Bean class?
10.	What is the parent tag in hbm.xml file?
11.	Which tag is used to configure class in hbm.xml file?
12.	Which tag is used to configure primary key property in hbm.xml file?
13.	Which generator generates primary key value by increment with previous primary key value?
14.	What is the importance of cascade attribute in hbm.xml file?
15.	In which tag cascade attribute is used in hbm.xml file?
16.	Which tag is used to specify on-to-many relationship in hm.xml file?
17.	Which collection classes are used in Java Bean to specify one-to-many relationship?
18.	Which collection classes are used in Java Bean to specify many-to-one relationship?
19.	Which Hibernate class is used in client program to load hibernate.cfg.xml file?
20.	In which Hibernate class hibernate.cfg.xml file properties are stored?
21.	Which is central class in Hibernate API to perform CRUD operations?
22.	How to manage transaction in hibernate?
23.	In which class commit() and rollback() methods exist in Hibernate API?
24.	What happens when save() method is used in client program?
25.	What happens when flush() method is used in client program?
26.	Which clauses are mandatory in HQL statement?
27.	What are the clauses exist in HQL statement?
28.	How to perform JOINS in HQL Statement?
29.	How to obtain single column in HQL statement?
30.	How to obtain a complete object in HQL statement?
31.	How to obtain all the records from database in HQL statement?
32.	How to call stored procedures in Hibernate?
33.	How to write named queries in hbm.xml file?
34.	How to load named query in client program?
35.	How to write SQL query in client program?
36.	What is the difference between save() and persist() methods?
37.	What is the difference between update() and merge() methods?
38.	Which annotation is used to name class as a Entity in Java Bean?
39.	Which annotation is used to specify primary key in Java Bean?
40.	Which annotation is used in Java Bean to specify one-to-many relationship?

Spring questions comes here.