8:06 am - Sunday August 20, 2017

Tag Archives: Example code

Calendar in java example program computeTime()

/** @author: candidjava @description: Calendar in JAVA example program for computeTime() */ import java.util.Calendar; import java.util.GregorianCalendar; public class CalendarDemo extends GregorianCalendar { public static void...

LinkedList Example Program for removeFirst()

/** *LinkedList Example Program for removeFirst() * @author   candidjava.com * @description:  Removes first element of the linkedlist . */ import java.util.LinkedList; public class List { public static void main(String args[])...

LinkedList Example Program for pollFirst()

/** *@author: candidjava.com *@description: coding  for linked list poll method */ import java.util.LinkedList; public class LinkedListDemo { public static void main(String[] args) { // create a LinkedList LinkedList list =...

LinkedList Example Program for peek()

/** *@Author:candid *@Definition:find head of the list using peek() *@class:Peek */ import java.util.*; public class Peek { public static void main(String args[]) { LinkedList<String> ls = new LinkedList<String>();//...

Thread Example program for join(long mills,int nanos)

** program : Java using join. author : "candid" date :22.11.2012 */ public class Join1 implements Runnable { public void run() { Thread th = Thread.currentThread(); System.out.println(th.getName()+" is alive "+th.isAlive()); } public...

Long Example Program for valueOf(String s,int radix)

/** @author: candidjava @description: valueOf(String s,int radix) is return a Long object holding the value represented by the string argument in the specified radix. */ public class DeeValueOfStringRadixLong { public static void main(String[]...

Long Example Program for valueOf(String s)

/** @author: candidjava @description: valueOf(String s) is used to a long object holding the value of specify string */ public class DeeValueOfStringLong { public static void main(String[] args) throws Exception { try{ String s="candid";//get...

Long Example Program for valueOf(long l)

/** @author: candidjava @description: valueOf(long l) is used to Returns a Long instance representing the specified long value. */ public class DeeValueOfLong { public static void main(String[] args) { Long l=new Long(2);//get the...

Sample JDBC program using MySQL

Boolean Example Programs

Boolean Example Program for compareTo(Boolean b)  ________________________________________________________________________________________________________ Boolean Example Program for parseBoolean(String s)  ________________________________________________________________________________________________________ Boolean...

Integer Example Program for doubleValue()

/** *@author :CandidJava.com *@descriptions : Basic Integer program using DoubleValue(); */ import java.io.*; public class DoubleValueEx { public static void main(String args[]) { Integer i = new Integer(107); // Object creation...

HashMap Example programs

HashMap example  program to check if a particular key exists using containskey() ________________________________________________________________________________________________________ HashMap Example for Get Size() ________________________________________________________________________________________________________ HashMap...

LinkedHashMap example program by using get () method

/** *@author :CandidJava.com *@descriptions : This program explain the function and use of get() method */ /**LinkedHashMap get*/ import java.util.*; import java.util.LinkedHashMap; class LinkedHashMapget{ public...

Struts logic present logic notPresent example program

Project Structure:       Jar files:                       LogicPresentAction.java: package com.candidjva; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import...

Struts logic lessThan logic lessEqual example program

Project Structure:                            JAR Files:                LogicLessThanEqualAction.java: package com.candidjava; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import...

Struts logic greaterThan logic greaterEqual example program

Project Structure:                          JAR Files:                  LogicGreterThanEqualAction.java: package com.candidjava; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import...