Program public class DateNanoSeconds { public static void main(String[] args) { System.out.print("time in nanoseconds = "); System.out.println(System...
Author - Mathan Lal
Program import java.time.LocalDate; public class DateLocalDate { public static void main(String[] args) { LocalDate date = LocalDate.now(); LocalDate yesterday...
Program import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date;...
Program import java.util.Calendar; public class DateAllDays { public static void main(String[] args) { Calendar calendar = Calendar.getInstance(); if (args...
Program import java.time.LocalDateTime; public class CompareDateWithTime { public static void main(String[] args) { // TODO Auto-generated method stub...
Program import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class CompareDate { public static void main(String[]...
Program import java.time.LocalDate; import java.time.Period; import java.util.Scanner; public class Age { public static void main(String[] args) { // TODO Auto...
Program import java.time.LocalDateTime; import java.time.ZoneId; import java.time.ZonedDateTime; public class LocalDateTimeMillisecond { public static void...
Program import java.time.LocalDate; import java.time.LocalTime; import java.time.LocalDateTime; import java.time.Month; public class FormatDateTimeApi { public...
Program import java.time.LocalDate; import java.time.ZoneId; import java.util.Date; public class DateUtilDateToLocalDate { public static void main(String[]...
Program import java.time.Instant; import java.time.LocalDateTime; import java.time.ZoneId; import java.util.Date; public class DateLocalTimeToUtilDate { public...
Program import java.util.Arrays; public class Sort { public static void main(String[] args) { byte [] b = new byte [] {1,8,9,3,6,}; char [] c = new char []...
Program import java.util.Arrays; public class ParralelSort { public static void main(String[] args) { int[] i1 = {18, 1, 14, 2, 15, 12, 5, 4}; System.out...
Program import java.util.Arrays; public class HashCode { public static void main(String[] args) { boolean [] b1 = new boolean [] {true}; boolean [] b2 = new...
Program import java.util.Arrays; import java.util.Spliterator; public class ArraysSplitratorInt { public static void main(String[] args) { int[] arr = { 1, 2...
Program import java.util.Arrays; public class ArraysParrelelPrefix { static int compute(int x,int y) { return x + y; } public static void main(String[] args) {...
Program import java.util.Arrays; import java.util.Comparator; public class ArraySearch { public static void main(String[] args) { Short jas[] = new Short[] {...
Program import java.util.Arrays; public class Arrayscompare { public static void main(String args[]) { int[] array1 = {4, 8, 12, 16, 20}; int[] array2 = {4, 8...
Program import java.util.Arrays; public class ArrayHashCode { public static void main(String[] args) { int[] iva = new int[] { 3, 5 }; int ret = iva...
Program import java.util.Arrays; public class ArrayDeepToString { public static void main(String[] args) { int[][] mat = new int[2][2]; mat[0][0] = 99;...