• Exceptions,  Interview Questions

    Out of memory exception or memoryOutofBound

    In Java Garbage collector is used internally to free the memory for JVM to work properly, and when memory is not enough for system or java application to work then exception is raised which belongs to java.lang package called OutOfMemoryError exception, If you are java developer I would doubt if you say this you never hit or get in life span. It usually comes when you not configure your content server who is managing your application or may be your application has memory leaks. Now Below I will try to explain why memory leakage is raised in application. Vector store = new Vector(); String GCnotCollected =new String(“TestString”); store.add(GCnotCollected); Until you will…

    Comments Off on Out of memory exception or memoryOutofBound
  • Interview Questions,  Tomcat

    Why Tomcat 7 upgarde, and Tomcat 7 Vs Tomcat 6

    Apache released a new version of 7.0.25, and who used to use previous versions may required to have their TOMCAT upgarded, here I am try to state why you required to be upgrade to Tomcat 7, before describing the reasons to upgrade the tomcat here fist I will explain the main differences between Tomcat 7 and Tomcat 6.     Difference between Tomcat 7 and Tomcat 6: Apache Tomcat Server 7 Apache Tomcat Server 6 The latest sub version of Apache Tomcat Server 7 is Apache Tomcat Server 7.0.25. The last version of Apache Tomcat Server 6 was Tomcat 6.0.35. Apache Tomcat Server 7 needs Java SE 6 or further version.…

  • Action,  ActionForm,  Interview Questions,  Learn Struts,  Struts 2

    Struts2, First “Hello World Application”

    In this tutorial we will see how to create a simpe Struts 2 Hello World Application. The following files are needed to create a Hello World Application. web.xml struts.xml HelloWorld.java index.jsp success.jsp web.xml is used to configure the servlet container properties of the hello world appliation. The filter and the filter-mapping elements are used to setup the Struts 2 FilterDispatcher. The filter is mapped to the URL pattern “/*“. This means all the incoming request that targets to the Struts 2 action will be handled by FilterDispatcher class. <filter><filter-name>struts2</filter-name><filter-class>org.apache.struts2.dispatcher.FilterDispatcher </filter-class></filter><filter-mapping><filter-name>struts2</filter-name><url-pattern>/*</url-pattern></filter-mapping><welcome-file-list><welcome-file>index.jsp</welcome-file></welcome-file-list> The gateway for our hello world application is index.jsp file. The index.jsp file should be mentioned in web.xml as shown…

  • Design patterns,  Interview Questions

    Interview Questions on Design pattern

    Till now I have given number of interview and below are the questions asked most of the time: What is Singleton Pattern, Where to use Singleton Pattern? What is Creational Patterns? What is Factory Design Patterns? What is Abstract Factory Patterns? What is Prototype Desingn Patterns? What is Fasad Design Patters? Why we use Design Patterns, and where not to use Design Pattern? What are Anti Patterns, What is the used and where to use Anti Design Patterns? These are the few questions asked in my interview, and I am searching for best answer for these.

    Comments Off on Interview Questions on Design pattern
  • Interview Questions,  spring,  Spring Interview Questions

    Differences between Object Oriented Programming and Aspect Oriented Programming?

    Object Oriented Programming (OOP) Works on System level code, OOP looks at an application as a set of collaborating objects. OOP code scatters system level code like logging, security etc with the business logic code. OOP works on elements like classes, objects, interfaces etc. Provides benefits such as code reuse, flexibility, improved maintainability, modular architecture, reduced development time etc with the help of polymorphism, inheritance and encapsulation. Aspect Oriented Programming (AOP) Aspect Oriented Programming works at the complex software system as combined implementation of multiple concerns like business logic, data persistence, logging, security, multithread safety, error handling, and so on. Separates business logic code from the system level code. In fact one concern remains unaware of other concerns. AOP has…

  • Interview Questions,  spring,  Spring Interview Questions

    Benefits of Aspect Oriented Programming

    Benefit of Aspect Oriented Programming Aspect Oriented Programming helps overcome system level coding i.e. Logging, Transaction or Security management problem by centralizing these cross-cutting concerns. Aspect Oriented Programming addresses each aspect separately in a modular fashion with minimal coupling and duplication of code. This modular approach also promotes code reuse by using a business logic concern with a separate logger aspect. Make easier to add newer functionality’s by adding new aspects and weaving rules and subsequently regenerating the final code. This ability to add newer functionality as separate aspects enable application designers to delay or defer some design decisions without the dilemma of over designing the application. Rapid development of evolutionary prototypes using OOP by focusing only…

    Comments Off on Benefits of Aspect Oriented Programming
  • General Interview Ethics,  Interview Questions

    Interview Ethics or Does and Don’t for Interview

    Please find below some does and Don’t to be strictly adhere while you are interviewing by anyone: First impressions are everything: Firm handshake, maintain eye contact, smile, watch your body language, be pleasant, dress neatly and know the names of your interviewers and thank them by their names for the opportunity. Arrive 5-10 minutes before the interview. Never arrive too late or too early. If you are running late due to some unavoidable situation, call ahead and make sure that the interviewers know your situation. Also, be apologetic for arriving late due to unfortunate situation.  Try, not to show that you are nervous. Every body is nervous for interviews but try not to show…

    Comments Off on Interview Ethics or Does and Don’t for Interview
  • General Interview Ethics,  Interview Questions

    What is the point of Test Driven Development (TDD)? What do you think of TDD?

    TDD process improves your confidence in the delivered code for the following reasons. TDD can eliminate duplication of code and also disciplines the developer to focus his mind on delivering what is absolutely necessary. This means the system you develop only does what it is supposed to do because you first write test cases for the business requirements and then write the required functionality to satisfy the test cases and no more. These unit tests can be repeatedly run to alert the development team immediately if someone breaks any existing functionality. All the unit tests can be run overnight as part of the deployment process and test results can be emailed to the development team.…

    Comments Off on What is the point of Test Driven Development (TDD)? What do you think of TDD?
  • General Interview Ethics,  Interview Questions

    What is Test Driven Development (TDD)?

    TDD is an iterative software development process where you first write the test with the idea that it must fail.This is a different approach to the traditional development where you write the application functionality first and then write test cases. The major benefit of this approach is that the code becomes thoroughly unit tested (you can use JUnit or other unit testing frameworks). For JUnit refer Q14 on “How would you go about…” section. TDD is based on two important principles preached by its originator Kent Beck: Write new business code only if an automated unit test has failed: Business application requirements drive the tests and tests drive the actual functional code. Each test…

    Comments Off on What is Test Driven Development (TDD)?
  • Interview Questions,  spring,  Spring Basics,  Spring Interview Questions

    What is IOC also known as inversion of control?

    Inversion of control or dependency injection (which is a specific type of IoC) is a term used to resolve objectdependencies by injecting an instantiated object to satisfy dependency as opposed to explicitly requesting anobject. So objects will not be explicitly requested but objects are provided as needed with the help of an Inversion Of Controller container (e.g. Spring etc). This is analogous to the Hollywood principal where the servicing objects say to the requesting client code (i.e. the caller) “don’t call us, we’ll call you”. Hence it is called inversion of control. Many of us are familiar with the software development context where client code collaborates with other dependent objects (or servicing objects) by…

    Comments Off on What is IOC also known as inversion of control?