Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Java: How to reverse a string

public class Reverse_Str
{
  public static void main (String[] args)
  	{
    String str = "Welcom";
    StringBuilder lettersBuff = new StringBuilde

Java: convert an object array to a collection

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class Generic_Meth
{
  // The method takes an array of objects and

Java: How to create a generic class

public class Generic_Class  // Definition of a generic class
 {
  T obj; // Declare an object of type T
  Generic_Class(T obj)
  {
    this.obj = obj

Java: How to use Generic HashMap

import java.util.HashMap;
public class Generic_Hash
 {
  public static void main(String[] args) 
  {
    HashMap map = new HashMap();
    map.put(1,

Java: How to reverse the words in a string

import java.util.Stack;
import java.util.StringTokenizer;
public class Word_Inverse
{
  public static void main (String[] args)
  	{
	String str = "W

Java: Generic list Example

import java.util.List;
import java.util.ArrayList;
public class Ex_Generique
{
	public static void main (String[] args)
		{
         List liste_mot =