Can we in Oracle?

Written by admin on . Posted in Can we

Can we create index on view ?

No

 

Can we write a trigger for a view ?

No

 

Can we avoid unique index creation while creating Unique Key????

Yes

 

Can we create index on to_char and subfunction?

Yes

 

Can we create index on user defined function?

Yes

 

Can we reset the sequence without cycle option ?

Yes. ALTER option can be used for this purpose

Can we in Servlet?

Written by admin on . Posted in Can we

Can we call destroy method from init? 

Yes. But that will work as normal method call.

 

Can we write Constructor for Servlet ? 

Yes. But you have to provide one non parameter Constructor otherwise container will throw an exception.

 

Can we Override init() method? 

Yes.

 

Can we Override destroy() method? 

Answer Awaited

Can we in JSP?

Written by admin on . Posted in Can we

Can declare a method in a jsp page.?

Yes we can. Declaration can be used for this purpose.

 

Can we write a thread safe JSP?

Yes, By using below directive
<%@ page isThreadSafe="false" %>

 

Can I enable session tracking for JSP pages if the browser has disabled cookies?

Yes, By using below directive
<%@ page session="true" %>

Can we in Core Java

Written by admin on . Posted in Can we

Here we will find the answer of all the Can we question in Core Java.

Can we create more then one public class in a single file? If no why not?

No you can't create more then 1 public class in a single java file.

 

Can we override static method?

No. Static method can't be overridden. It can be hidden.

 

Can we create more then one public class in a single java file? If No why?

No.

 

Can we create private Constructor?

Yes. Private constructor add constraint in class that nobody can create the object of your class outside the class.

 

Can we override the equal method without overriding hashcode?

Yes.

 

Can we create an immutable class without using final keyword?

Answer Awaited.

 

Can we Overload the Overridden method?

Answer Awaited.

 

Can we add primitives to ArrayList?

Answer Awaited.

 

Can we call C code from Java class?

Answer Awaited.

 

Can we create Private Class?

No

 

Can we have multiple main methods in the same class?

Yes. Overriden main method could be there but with below signature only one main method could be there
public static void main(String[] args) {}

 

Can we create a Static method which is synchronised?

Answer Awaited

 

**Can we have an inner class inside a method?

Yes, we can have those methods are called Method Local Inner class.