Link will be apear in 30 seconds.
Well done! you have successfully gained access to Decrypted Link.
Encrypting your link and protect the link from viruses, malware, thief, etc! Made your link safe to visit.
Write a program that creates a Date object, sets its elapsed
time to 10000, 100000, 1000000, 10000000, 100000000, 1000000000,
10000000000, and 100000000000, and displays the date and time using the
toString() method, respectively.
A Java program is as follows,
File name: “Sample.java”
//Create a class
public class Sample {
//Define the main() method
public static void main(String[] args) {
//Create Date object
java.util.Date d = new java.util.Date();
//Initialize the array
long[] tms = new long[] {10000, 100000, 1000000, 10000000,
100000000, 1000000000, 10000000000L, 100000000000L};
//Create a loop
for (int i = 0; i < tms.length; i++) {
//Call the method
d.setTime(tms[i]);
//Print the date and time
System.out.println(d.toString());
}
}
}
</body>
of your blog.