Program import java.io.*; public class FileCanExecute { public static void main(String args[]) { File f = new File("bin"); if (f.canExecute()) { System.out...
Author - Mathan Lal
Program public class FileBooleanEquals { public static void main(String[] args) { File file1 = new File("c:\\program\\test.txt"); File file2 = file1; File...
Program public class StringConcat { public static void main(String args[]) { String s1 = "I am"; System.out.println(s1); s1 = s1.concat(" a good boy"); System...
Program public class StringCompareTo { public static void main(String[] args) { String s1 = "I"; String s2 = "AM"; String s3 = "GOOD"; String s4 = "INDIAN";...
Program public class ToCase { public static void main(String args[]) { String Str = new String("Welcome to Girikalan Magic Show"); System.out.println(Str...
package com.candidjava; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; class Studentdata { int rno; String name; int...
package com.candidjava; import java.util.ArrayList; import java.util.Collections; class Author implements Comparable<Author> { String authorname; String...
package com.candidjava; import java.util.ArrayList; public class Intarraysortingwithoutsort { public static void main(String[] args) { ArrayList<Integer> al...
package com.candidjava; import java.util.ArrayList; import java.util.Arrays; import java.util.Iterator; public class Arraylistsortwithoutsortmethod { public...
package com.candidjava; import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; public class ArrayListDescending { public static...
package com.candidjava; import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; public class ArrayListAscending { public static...
public class HashMap extends AbstractMapK – the type of keys maintained by this mapV – the type of mapped values public V put(K key, V...
package com.candidjava; import java.util.ArrayList; import java.util.Iterator; class Student { int rollno; String name; int age; Student(int rollno, String...
package com.candidjava; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; public class...
public boolean addAll(int index,Collection c)Inserts all of the elements in the specified collection into this list, starting at the specified position. Shifts...
public boolean addAll(Collection c)Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the...
public void add(int index,E element)Inserts the specified element at the specified position in this list. Shifts the element currently at that position (if...
public class ArrayList extends AbstractListimplements List, RandomAccess, Cloneable, Serializable public boolean add(E e)Appends the specified element to the...
Java 12 – Switch expressions Java 12 JEP 325 Extend switch so it can be used as either a statement or an expression, and so that both forms can use...
public final class Instant extends Object This class models a single instantaneous point on the time-line. This might be used to record event time-stamps in...