-
What is Struts2?
Apache Struts2 is an open source framework to build web applications in Java. Struts2 is based on OpenSymphony WebWork framework. It’s highly improved from Struts1 and that makes it more flexible, easy to use and extend. The core components of Struts2 are Action, Interceptors and Result pages.
Struts2 provides many ways to create Action classes and configure them via struts.xml or through annotations. We can create our own interceptors for common tasks. Struts2 comes with a lot of tags and uses OGNL expression language. We can create our own type converters to render result pages. Result pages can be JSPs and FreeMarker templates. -
What are the differences between Struts1 and Struts2 or how Struts2 is better than Struts1?
Struts2 is designed to overcome the shortcomings of Struts1 and to make it more flexible, extendable. Some of the noticeable differences are:
Friday, January 31, 2014
Struts2 Interview Questions and Answers
Core Java Interview Questions and Answers
Whether you are a fresher or highly experienced professional, core java
plays a vital role in any Java/JEE interview. Core Java is the favorite
area in most of the interviews and plays a crucial role in deciding the
outcome of your interview.
I have already written a lot about java interview questions for specific topics such as String, Collections and Multithreading.
I have already written a lot about java interview questions for specific topics such as String, Collections and Multithreading.
- Java String Interview Questions
- Java Thread Interview Questions
- Java Collections Interview Questions
- Java Exception Interview Questions
- What do you mean by platform independence of Java?
- What is JVM and is it platform independent?
- What is the difference between JDK and JVM?
- What is the difference between JVM and JRE?
- Which class is the superclass of all classes?
- Why Java doesn’t support multiple inheritance?
- Why Java is not pure Object Oriented language?
- What is difference between path and classpath variables?
- What is the importance of main method in Java?
- What is overloading and overriding in java?
- Can we overload main method?
- Can we have multiple public classes in a java source file?
- What is Java Package and which package is imported by default?
- What are access modifiers?
- What is final keyword?
- What is static keyword?
- What is finally and finalize in java?
- Can we declare a class as static?
- What is static import?
- What is try-with-resources in java?
- What is multi-catch block in java?
- What is static block?
- What is an interface?
- What is an abstract class?
- What is the difference between abstract class and interface?
- Can an interface implement or extend another interface?
- What is Marker interface?
- What are Wrapper classes?
- What is Enum in Java?
- What is Java Annotations?
- What is Java Reflection API? Why it’s so important to have?
- What is composition in java?
- What is the benefit of Composition over Inheritance?
- How to sort a collection of custom Objects in Java?
- What is inner class in java?
- What is anonymous inner class?
- What is Classloader in Java?
- What are different types of classloaders?
- What is ternary operator in java?
- What does super keyword do?
- What is break and continue statement?
- What is this keyword?
- What is default constructor?
- Can we have try without catch block?
- What is Garbage Collection?
- What is Serialization and Deserialization?
- How to run a JAR file through command prompt?
- What is the use of System class?
- What is instanceof keyword?
- Can we use String with switch case?
CORE JAVA INTERVIEW QUESTION (170 questions)
148)What are wrapper classes?
| Wrapper classes are classes that allow primitive types to be accessed as objects. |
149)What is a native method?
| A native method is a method that is implemented in a language other than Java. |
150)What is the purpose of the System class?
| The purpose of the System class is to provide access to system resources. |
151)What comes to mind when someone mentions a shallow copy in Java?
| Object cloning. |
CORE JAVA INTERVIEW QUESTION (170 questions)
117) What is Garbage Collection?
| Garbage collection is a process of reclaiming the runtime unused objects.It is performed for memory management. more details... |
118) What is gc()?
| gc() is a daemon thread.gc() method is defined in System class that is used to send request to JVM to perform garbage collection. |
119) What is the purpose of finalize() method?
| finalize() method is invoked just before the object is garbage collected.It is used to perform cleanup processing. |
120) Can an unrefrenced objects be refrenced again?
| Yes. |
121)What kind of thread is the Garbage collector thread?
| Daemon thread. |
122)What is difference between final, finally and finalize?
| final: final is a keyword, final can be variable, method or class.You, can't change the value of final variable, can't override final method, can't inherit final class. |
| finally: finally block is used in exception handling. finally block is always executed. |
| finalize():finalize() method is used in garbage collection.finalize() method is invoked just before the object is garbage collected.The finalize() method can be used to perform any cleanup processing. |
JSP INTERVIEW QUESTIONS (20 interview questions)
1)What is JSP?
| Java Server Pages technology (JSP) is used to create dynamic web page.It is an extension to the servlet.A JSP is internally converted into servlet. more details... |
2)What are the life-cycle methods for a jsp?
|
3)What is difference between hide comment and output comment?
| The jsp comment is called hide comment whereas html comment is called output comment.If user views the source of the page, the jsp comment will not be shown whereas html comment will be shown. |
Wednesday, January 29, 2014
Java Interview Questions
What do you know about Java?
A: Java is a high-level programming language originally
developed by Sun Microsystems and released in 1995. Java runs on a
variety of platforms, such as Windows, Mac OS, and the various versions
of UNIX.
Q: What are the supported platforms by Java Programming Language?
A: Java runs on a variety of platforms, such as Windows, Mac
OS, and the various versions of UNIX/Linux like HP-Unix, Sun Solaris,
Redhat Linux, Ubuntu, CentOS, etc.
Q: List any five features of Java?
A: Some features include Object Oriented, Platform Independent, Robust, Interpreted, Multi-threaded
Q: Why is Java Architectural Neutral?
A: It’s compiler generates an architecture-neutral object file
format, which makes the compiled code to be executable on many
processors, with the presence of Java runtime system.
Best Interview Tips For Personal Interview – Job Interview Questions And Answers
Continuing with the series on Job Interview Questions and Answers, below is an article on Best Interview Tips For Personal Interview.
It’s an eternal truth that cracking interviews remains one of the toughest challenges to combat for all aspirants or job seekers. Across the globe, any discussion or session on clearing interviews has been a buzzword!!! At times I feel that Interviews are more like real life movies for which there is an outline within which one needs to act. Also, it would not be wrong to say that it’s like a game. You know that you can do the job-you just need some help in persuading interviewers to give you the chance to prove it.
It’s an eternal truth that cracking interviews remains one of the toughest challenges to combat for all aspirants or job seekers. Across the globe, any discussion or session on clearing interviews has been a buzzword!!! At times I feel that Interviews are more like real life movies for which there is an outline within which one needs to act. Also, it would not be wrong to say that it’s like a game. You know that you can do the job-you just need some help in persuading interviewers to give you the chance to prove it.
Subscribe to:
Posts (Atom)