Yearly Archives: 2013

Javac/Java searching algorithm for other classes

With this post, I would like to explain how exactly the Java/Java will search for its dependencies in the project or application level. Java Applications can be run using the command line or in the Web/Application servers. For both the

Tagged with: , , , , , ,
Posted in JAVA

Example Program – Armstrong Number

Below sample programs finds whether the given number is an Armstrong Number or not. An Armstrong number of three digits is an integer such that the sum of the cubes of its digits is equal to the number itself. For example,

Tagged with: , , ,
Posted in JAVA

Example program to reverse a Number in Java

  package in.javatutorials; public class ReverseNumber { public static void main(String[] args) { System.out.println(“The reversed number is ” + reverse(1234)); } public static int reverse(int input) { int result = 0; int rem; while (input > 0) { rem =

Tagged with: , , , , , , ,
Posted in JAVA

Struts Internationalization Example

web.xml : <?xml version=”1.0″ encoding=”Shift_JIS”?> <!DOCTYPE web-app PUBLIC “-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN” “”&gt; <web-app> <servlet> <servlet-name>action</servlet-name> <servlet-class>org.apache.struts.action.ActionServlet</servlet-class> <init-param> <param-name>config</param-name> <param-value>/WEB-INF/struts-config.xml</param-value> </init-param> <init-param> <param-name>debug</param-name> <param-value>2</param-value> </init-param> <init-param> <param-name>detail</param-name> <param-value>2</param-value> </init-param> <load-on-startup>2</load-on-startup> </servlet> <servlet-mapping> <servlet-name>action</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>login.jsp</welcome-file> </welcome-file-list>

Tagged with: , , , , ,
Posted in Struts 1.x

How to find count of duplicates in a List

There are many different ways to find out the duplicates in a List or count of duplicates in a List object. Three best ways have been implemented in the below sample class. I suggest to go with 2nd sample, when

Tagged with: , , , , , ,
Posted in JAVA

How to Create a Thread Using Runnable Interface

In Java, a Thread can be created by extending to a Thread class or by implementing the Runnable Interface. In below example, I have tried to create the thread by implementing Runnable interface. package in.javatutorials; public class CreateThredByRunnable { public

Posted in JAVA

Threads Interview questions in Java

Thread concept is the most important topic for all the interviews. This post contains most important interview questions on Thread concepts. The answers for these questions will be covered in further posts. What is a thread ? What are the

Tagged with: , , , , , ,
Posted in JAVA

Access Specifiers in Java

An access specifier is a keyword that specifies how to access or read the members of a class or the class itself. There are four access specifiers in Java as mentioned below: private public protected default 1. Private : Private members

Tagged with: , , , , , , ,
Posted in Others

List of View Resolvers in Spring MVC

In Spring MVC, view resolvers enable you to render models in a browser without tying you to a specific view technology like JSP, Velocity, XML…etc. There are two interfaces that are important to the way Spring handles views are ViewResolver and View. The

Tagged with: , , , , , , , , , , , , , , ,
Posted in Spring

Basic Spring MVC Application

This post explains how to create spring based web application. Folder Structure: Typical folder structure of the spring web application contains as below. web.xml: Below is the web.xml file which contains the spring configuration. DispatcherServlet is controller of the spring mvc application,

Tagged with: , , , , , ,
Posted in Spring

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 677 other followers

June 2019
« Jan    
Mallikarjun Gunda

This is Mallikarjun Gunda, I am working as a software professional. Blogging is my Passion. This blog contains the posts on Java related technologies and programming languages. I am happy to share my knowledge through the blogs.

Blog Stats
  • 309,094 hits