3:53 pm - Wednesday March 24, 6258

Author Archives: veera

Remove specified element from Array list -Java Arraylist example

Here forllowing example program removes the first occurrence of the specified element from Array list remove(Object o). This method is used to remove the element at the specified position in Array List. Example Program import java.util.ArrayList; import...

Array List program for replace the element at the specified position set(int index, E element)

BACK This method is used to replace the element at the specified position in Array List. Example Program import java.util.ArrayList; public class ArrayListSet { public static void main(String args[]) { // create an arraylist ArrayList...

Java Example Program for delete duplicate element in an array

public class Task { /** * @ author:Candid @ description:Java Program to delete Duplicate elements * in an array */ public static void main(String args[]) { int array[] = { 10, 20, 30, 20, 40, 40, 50, 60, 70,...

Java Example Program for inverse matrix

public class Matrix { public static void main(String[] args) { // array creation and allocated memory int[][] array = new int[3][3]; // to initialize the values array[0][0] = 1; array[0][1] = 2; array[0][2]...

Java Example Program for delete element in array

public class DeleteArray { /** * @Author:candid * @Description:To Delete a element in an Array */ public static void main(String[] arguments) { // internalize the array int arg[] = { 5, 6, 8, 9, 10 }; // Delete the Array Element...

Java Example Program for largest and smaller number in array

public class Array { /** * @ author: Candid @ Description: write a java program to find largest & * smallest number in an array */ public static void main(String[] args) { int a[] = new int[] { 5, 23, 45, 75, 10, 50, 7 }; int...

Java program for daemon thread

package Debug; public class DaemonThread extends Thread { /** * @author: candid * @description: java program for daemon thread. */ DaemonThread() { setDaemon(true); } public void run() { System.out.println("Is this thread Daemon?...

Java Program for Upper Triangular Matrix

public class MainUTM { public static void main(String[] args) { int[][] a = new int[3][3]; // declaration of an array. here array a // contain 3-rows and 3-columns. a[0][0] = 5; // here initializing 1st element of an array a[0][1]...

Java Example Program for lower triangular matrix

  public class MainLTM { public static void main(String args[]) { int[][] a = new int[3][3]; // declaration of an array. here array a // contain 3-rows and 3-columns. a[0][0] = 1; // here initializing 1st element of an array a[0][1]...

Struts 2 i18n Localization Example and Tutorial

BACK Struts 2 i18n Localization Example and Tutorial Localization.java package com.candidjava.controller; import com.opensymphony.xwork2.ActionSupport; public class Localization extends ActionSupport{ private String name; private...

Struts 2 Tiles Layout Example and Tutorial

BACK Struts 2 Tiles Layout Example and Tutorial   LinkAction.java package com.candid.action; import com.opensymphony.xwork2.ActionSupport; public class LinkAction extends ActionSupport { private static final long serialVersionUID...

Struts 2 Global Exception Handling Example and Tutorial

BACK Struts 2 Global Exception Handling Example and Tutorial GobalErrorHandling.java package com.candidjava.controller; import com.opensymphony.xwork2.ActionSupport; public class GlobalErrorHandling extends ActionSupport { private...

Struts 2 Exception Handling Example and Tutorial

BACK Struts 2 Exception Handling Example and Tutorial   Errorhandling.java   package com.candidjava.controller; import com.opensymphony.xwork2.ActionSupport; public class ErrorHandling extends ActionSupport{ private static...

Struts 2 Global results Example and Tutorial

BACK  Struts 2 Global results Example and Tutorial Validation.java package com.candidjava.action; import com.opensymphony.xwork2.ActionSupport; public class LinkAction extends ActionSupport { private static final long serialVersionUID...

Struts 2 Redirect or Forward Action Example and Tutorial

BACK Struts 2 Redirect or Forward Action Example and Tutorial Struts.xml <struts> <package name="test" extends="struts-default"> <action name="view"> <result name="success">/view.jsp</result> </action> </package> </struts>   index.jsp <html> <head> </head> <body> <h3>Candid...

Struts 2 Multi Action or Dispatch Action Example and Tutorial

BACK Struts 2 Multi Action or Dispatch Action Example and Tutorial MultiAction.java package com.candidjava.controller; import com.opensymphony.xwork2.ActionSupport; public class MultiAction extends ActionSupport{ private static final...

Struts 2 Form Handling Example and Tutorial

To Insert Number using array Concept

BACK In this tutorial you will learn how to INSERT ELEMENT TO THE ARRAY. Method with Example Program. public class Array { public static void main(String[] args) { int[] a = new int[7]; a[0] = 0; a[1] = 1; a[2] = 2; a[3] = 3; System.out.print(“Before...

Arrays example programs and Tutorial in java

BACK 1)To Insert Number using array Concept. 2) Creating Program for how to get a fixed-size list backed by the specified array using static <T> List<T> method 3) Creating Program for Searches the specified array of bytes for...

To CharAt using StringBuffer CharAt Method

BACK In this Tutorial you will learn how to   CharAt  Using StringBuffer CharAt Method With Example program. public class StringBufferCharAtExample { public static void main(String args[]) { StringBuffer sb = new StringBuffer("Students...