Tag Archives: java j2ee Training and Placement by mindsmapped

Template Method Design Pattern in Java

Template Method is a behavioral design pattern and it’s used to create a method stub and deferring some of the steps of implementation to the subclasses. Template method defines the steps to execute an algorithm and it can provide default implementation that might be common for all or some of the subclasses. Template means Preset format like HTML templates which […]

Struts2 Spring 3 Integration Example

Struts2 Spring 3 Integration Example Now first question comes here ,why you want to integrate spring with struts 2? Spring provides some features which are not available in struts 2.Most powerful among them is dependency injection.To learn more about dependency injection,you can refer dependency injection in spring link. Create project named “Struts2Spring3IntegrationExample”. First of all, you need […]

Listeners: Can Java Hear You?

What Sort of Listener Are You? If we tried to implement a full graphical interface in a program by using MouseListener, we’d have a lot of work to do. We’d have to draw all the buttons using drawing instructions in our program, then wait for mouse clicks. Once we got a click on something we’d […]

Java’s Inner Classes: The Keys to the Kingdom

An inner class is a Java class that’s defined inside another class. In both the examples above, I have a class called VGKernel, which is the class that implements the video game kernel. Inside that class, I define other classes. This has a special effect on the relationship between those classes and VGKernel. Normally, our […]

Java Video Game Programming: Game Logic

CodeSpells, an immersive, first-person player video game designed to teach students in elementary to high school how to program in the popular Java language, has been developed by University of California, San Diegocomputer scientists. In simple video games, there is usually some object in the game that does most of the “thinking” with respect to the game’s rules. […]

Jackson example – Read and write JSON

Java JSON Processing API is not very user friendly and doesn’t provide features for automatic transformation from Json to Java object and vice versa. Luckily we have some alternative APIs that we can use for JSON processing. In last article we learned about Google Gson API and saw how easy to use it. Jackson project has implemented a very […]

Introduction to hibernate framework

Hibernate is an open source object/relational mapping tool for Java. Hibernate lets you develop persistent classes following common Java idiom – including association, inheritance, polymorphism, composition and the Java collections framework. Hibernate not only takes care of the mapping from Java classes to database tables (and from Java data types to SQL data types), but […]

How to remove duplicates from ArrayList in java

You can remove duplicates or repeated elements from ArrayList in Java by converting ArrayList into HashSet in Java. but before doing that just keep in mind that Set doesn’t preserver insertion order which is guaranteed by List, in fact that’s the main difference between List and Set in Java. So when you convert ArrayList to HashSet all duplicates elements will be removed but insertion order will […]

How to configure Apache Tomcat 7 in eclipse

Building Apache Tomcat from source is very easy, and is the first step to contributing to Tomcat. The complete and comprehensive instructions are provided in the file BUILDING.txt. The following is a quick step by step guide. 1.Install Java. Building Apache Tomcat requires a Java 6 JDK to be installed and optionally a Java 7 JDK […]

Configuring Hibernate in Eclipse

Hibernate is an object/relational mapping tool for Java environments. What does it mean the term object/relational mapping? simply a technique of mapping a data representation from an object model to a relational data model with a SQL-based schema. Hibernate Installation/Setup on Eclipse IDE You should download the latest production release of Hibernate from the Hibernate website at http://www.hibernate.org/ orhttp://sourceforge.net/projects/hibernate/files/hibernate3/ and […]