Friday, October 21, 2005
Microsoft Cordless Mouse Ce0560 Driver
out of memory error [java] function: getResource (), example. Annotations on Java Basic
This is a clear example of how to use the getResource (). The program returns the address where "getClassPathInfo.class is located. //--------------------------------------- -----
public class getClassPathInfo {public
getClassPathInfo () {}
public static void main (String [] arg) { System.out.
println ("File:" + getClassPathInfo. class . getResource ( "get ClassPathInfo.class"). getFile ()); System.out.
println ("URL:" + getClassPathInfo. class . getResource ( "getClassPathInfo.class" )); System.out.
println ("Path:" + getClassPathInfo. class . getResource ( "getClassPathInfo.class" ). GetPath ());
}}
//------------------------------------- -------
Monday, September 19, 2005
Household Items That Make Good Lubricant
private : The variable or method is accessible only within the class where it is defined.
protected : The variable or method is available in the class where it is set and any of its subclasses. public
: The variable or method is available in any class.
none of the above : The variable or method is accessible within the same package (directory).
Thursday, July 28, 2005
Thursday, July 14, 2005
Put Muscion Tracfone Motorola C139
ASCII tables [Java] parses string date "dd-mm-yyyy" and converts it into 3 integers.
This program is explained only ..
public
parseaFechaConvierteEnInt (String date) {
/ / parse the date entered .. eg 01/02/2000
int INDX = date. indexOf ("- ", 0); / / INDX = 1
String dS = date. substring (0, INDX) / / d = "1"
indx2 int = date. IndexOf ("-", INDX +1); / / indx2 = 3
String mS = date. substring (INDX +1, indx2) / / m = "2"
int len \u200b\u200b= date. length () ; / / len = 8
String aS = date. substring (indx2 +1, len); / / a = "2002"
/ / convert strings to integers of
int d = Integer. ValueOf (dS). intValue ();
int m = Integer. ValueOf (mS). intValue ();
int a = Integer. ValueOf (aS). intValue ();}
Wednesday, July 13, 2005
Difference Between Stacked Bob Graduated Bob
[Java] difference in days between two dates
This function calculates the difference in days between two dates. Taking as an example of initial date on January 1, 2000 and end date on January 10, 2000, the result returned by the function will be equal to '9 '.
public
long difDiasEntre2fechas (int Y1,int M1,int D1,int Y2,int M2,int D2){
new java.util. GregorianCalendar (Y1,M1,D1);
java.util.GregorianCalendar date2= new java.util. GregorianCalendar (Y2,M2,D2);
long difms=date2. getTimeInMillis () - date1. getTimeInMillis ();
long difd=difms / ( 1000 * * 60 60 24 * )
DIFD return;
Thursday, June 30, 2005
Subscribe to:
Posts (Atom)