0% found this document useful (0 votes)
29 views5 pages

Java - Environment Setup: Dowload

1) The document discusses setting up the Java environment on Windows, including downloading the Java Development Kit (JDK), setting the path variable to include the Java executable location. 2) It also covers Java numeric classes like Integer, Long, Float, and their common methods like compareTo(), abs(), ceil() etc. 3) Additionally, it summarizes Java Strings and StringBuffer class with their methods, how to define and use arrays in Java with examples, and the Date/Time class with common methods like getTime(), setTime(), toString().

Uploaded by

vtt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views5 pages

Java - Environment Setup: Dowload

1) The document discusses setting up the Java environment on Windows, including downloading the Java Development Kit (JDK), setting the path variable to include the Java executable location. 2) It also covers Java numeric classes like Integer, Long, Float, and their common methods like compareTo(), abs(), ceil() etc. 3) Additionally, it summarizes Java Strings and StringBuffer class with their methods, how to define and use arrays in Java with examples, and the Date/Time class with common methods like getTime(), setTime(), toString().

Uploaded by

vtt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 5

1.

Java - Environment Setup


Dowload
1. http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
2. https://www.netbeans.org/index.html or https://www.eclipse.org/

Setting Up the Path for Windows


1. Right-click on 'My Computer' and select 'Properties'.
2. Click the 'Environment variables' button under the
'Advanced' tab.
3. Alter the 'Path' variable so that it also contains the path to
the Java executable. c:\Program Files\java\jdk\bin'.
2. Java - Numbers Class
• Integer, Long, Byte, Double, Float, Short

Method
compareTo() abs()
Example equals() ceil()
• int i = 5000; valueOf() floor()
• Long l = 10l;
• float f = 13.65; toString() min()
• double d = 0xaf; parseInt() max()
Java - Strings – StringBuffer
String Methods StringBuffer
• compareTo() • append()
• concat()
• equals() • delete()
• indexOf() • insert()
• length() • replace()
• replace()
• split()
• indexOf()
• substring() • length()
• toLowerCase() • substring()
• toUpperCase()
.....
• trim()
Java - Arrays
Syntax
arrayRefVar = new dataType[arraySize];

Example
public static void main(String[] args) {
double[] myList = {1.9, 2.9, 3.4, 3.5};
// Print all the array elements
for (int i = 0; i < myList.length; i++) {
System.out.println(myList[i] + " ");
}
}

Method
• equals(long[] a, long[] a2)
• void fill(int[] a, int val)
• void sort(Object[] a)
Java - Date and Time
Method

after(Date date)
before(Date date)
compareTo(Date date)
equals(Object date)
getTime( ) Example
setTime(long time) import java.util.Date;
public class DateDemo {
toString( ) public static void main(String args[]) {
// Instantiate a Date object
Date date = new Date();
// display time and date using toString()
System.out.println(date.toString());
}
}

You might also like