Home

Java programming language

Here are the popular Java programming language topics.

Basic Topics

  1. Explain JDK and JRE.
  2. Why java is platform independent?
  3. How to set path in Java in Windows?
  4. Differences between path and classpath in java?
  5. How to run java class file which is in different directory?
  6. Why does java file name must be same as public class name?
  7. Differences between Heap and Stack Memory in Java?
  8. Different types of comments.
  9. Is main() method compulsory in Java?
  10. Can we overload main() method in Java?
  11. Can we override main() method in Java?
  12. Printing the formatted text with printf in Java.
  13. Java - Difference between float and double.
  14. Difference between next() and nextLine() methods.
  15. Difference between throw and throws.
  16. Unexpected Behaviour of Standard Java Input and Output through Scanner Class.
  17. Variable declaration, initialization in Java.
  18. Java variables types with examples
  19. Different ways to take input from the user in Java (Examples)
  20. Typecasting in Java
  21. Compare final, finally and finalize() in java.
  22. Conditional/Control Statements
    1. break statement in java.
  23. Looping statements
    1. for-each (enhanced for loop) in Java
  24. Command Line Arguments in Java with Example.
  25. How to declare and initialize an array in Java?
  26. Basic Array Operations in Java using Eclipse.
  27. Find maximum absolute difference in an array
  28. Java Garbage Collection with Examples.
  29. Final and static keywords in Java with Example.
  30. Differences between static and non static method in Java
  31. BigInteger Class and BigDecimal Class in Java.
  32. Java - this reference.
  33. this keyword and this() method in Java.
  34. super keyword and super() method in Java.
  35. Wrapper Classes in Java with Example.
  36. Differences between Abstract class and Concrete class
  37. Basics of File Handling in Java with Example.
  38. What are java files?
  39. Implementation of Methods of Math Class in Java.
  40. Scanner class and its methods in Java.
  41. How to generate random numbers within a range in Java?
  42. Explain recursion in Java with an Example.
  43. Explain StringBuffer with an example in Java.
  44. Types of Lists in Java
  45. Compare array and ArrayList in Java.
  46. Explain java ArrayList and its methods.
  47. Compare ArrayList and LinkedList in Java.
  48. Differences between abstract class and interface?
  49. Differences between abstraction and encapsulation?
  50. ToString Method in Java.
  51. Comparator in Java.
  52. Vector Class in Java.
  53. Why string is immutable or final in java?
  54. What is Deadlock, how to analyze and avoid it in java?
  55. Batch Processing In Java.
  56. Comparision of StringBuffer and StringBuilder.
  57. How to check if directory exists in Java?
  58. How to check an object is null in Java?
  59. How to add characters to a string in Java?
  60. How to check if string is number in java?
  61. How to add double quotes to a string in Java?
  62. How to avoid NullPointerException in Java?
  63. Differences between concat() method and plus (+) operator in Java
  64. Differences between Iterator and ListIterator in Java
  65. What is null in Java?
  66. Differences between Enumeration and Iterator in Java
  67. Differences between Vector and ArrayList in Java
  68. How to print elements of a Stream in Java 8?
  69. Differences between StringJoiner and StringBuilder in Java 8
  70. How to remove an entry from a Collection in Java?
  71. How to sort objects of the Collection in Java?
  72. Stack class in Collection Framework in Java
  73. Differences between HashMap and LinkedHashMap in Java
  74. Differences between Set and List interface in Java
  75. Differences between HashSet and HashMap class in Java
  76. Differences between HashSet and LinkedHashSet in Java
  77. Differences between poll() and remove() methods of Queue Interface in Java
  78. Differences between Set and Map interface in Java
  79. Differences between List and Map interface in Java
  80. Differences between Hashtable and HashMap class in Java
  81. Differences between the reverse() and reverseOrder() in Java
  82. Differences between submit() and execute() methods in Java
  83. Differences between Synchronized Collection and Concurrent Collection in Java
  84. Differences between the interrupted() and isInterrupted() in Java
  85. Differences between HashMap and TreeMap in Java
  86. Differences between HashSet and TreeSet in Java

Object Oriented Programming (OOP)

  1. Access specifiers in Java
  2. Object as an Argument in Java
  3. Different ways to create an object in Java
  4. Object as an Array in Java.
  5. Why java is not pure object oriented programming language?
  6. Can we access private variable outside of the class in Java?
  7. Java Constructors with Examples
  8. Differences between constructors and methods in Java
  9. Inheritance in Java with Example.
  10. Inheritance and its implementation in Java
  11. Types of Inheritance in Java with Examples
  12. Using final keyword with inheritance in Java
  13. Why java does not support multiple inheritances?
  14. Is it possible to have same data members in parent and child classes in Java?
  15. Polymorphism in Java with Example.
  16. Abstract Classes in Java with Example.
  17. Explain Inner class in java.
  18. How to access inner class in Java?
  19. Java Interfaces with its properties, implementation and Example.
  20. Interfaces used in Collection framework in Java
  21. Packages in Java.
  22. Packages in Java (more...)
  23. How to make Singleton Class using static in Java?
  24. Disadvantages/ Limitations of Object Arrays in Java.
  25. Compare Array and Collection in Java.
  26. Marker Interface in Java.
  27. What is static import in java?
  28. Java Reflection API to change the behavior of the class.
  29. How to access MetaData Of a class using Java?
  30. Covariant return type in java.
  31. What are the non access modifiers in Java?

Exception Handling

  1. Basics of Exception Handling In Java.
  2. Different ways to print Exception message in Java.
  3. Exception Handling with Example in Java.
  4. Nested try-catch Blocks with Example in Java.
  5. Handling Multiple Catch Clauses in Java.
  6. Creating User Defined Exceptions in Java.

Java Threads

  1. Explain life cycle of a thread in java.
  2. Thread properties in java.
  3. How to Create Java Threads (java examples to create threads)?
  4. Thread Synchronisation in Java with Example.
  5. Difference between Process and Thread in java.
  6. Differences between User Thread and Daemon Thread in Java.
  7. How to create daemon thread in java?
  8. What will happen if we don't override thread class run() method in java?
  9. How can we achieve Thread Safety in java?
  10. Thread Scheduler and Time Slicing in Java.
  11. Thread pool in java, how to create it?
  12. What is Multi Threading in Java?
  13. How to get and set name of a thread in Java?
  14. How to stop a thread in Java?
  15. Differences between wait() and sleep() methods in Java

Java Math Class Methods

  1. Java Math Class static int abs(int i) method with example
  2. Java Math Class static long abs(long l) method with example
  3. Java Math Class static float abs(float f) method with example
  4. Java Math Class static double abs(double d) method with example
  5. Java Math Class static double asin(double d) method with example
  6. Java Math Class static double acos(double d) method with example

Java Thread Class Methods

  1. Java Thread Class final void checkAccess() method with Example
  2. Java Thread Class static int activeCount() method with Example
  3. Java Thread Class static Thread currentThread() method with Example
  4. Java Thread Class static void dumpStack() method with Example
  5. Java Thread Class static int enumerate(Thread[] th) method with Example
  6. Java Thread Class static Map getAllStackTraces() method with Example
  7. Java Thread Class long getId() method with Example
  8. Java Thread Class ClassLoader getContextClassLoader() method with Example
  9. Java Thread Class static Thread.UncaughtExceptionHandler getDefaultUncaughtExceptionHandler() method with Example
  10. Java Thread Class Thread.UncaughtExceptionHandler getUncaughtExceptionHandler() method with Example
  11. Java Thread Class final String getName() method with Example
  12. Java Thread Class final int getPriority() method with Example
  13. Java Thread Class StackTraceElement[] getStackTrace() method with Example
  14. Java Thread Class Thread.State getState() method with Example
  15. Java Thread Class final ThreadGroup getThreadGroup() method with Example
  16. Java Thread Class static boolean holdLock(Object o) method with Example
  17. Java Thread Class void interrupt() method with Example
  18. Java Thread Class static boolean interrupted() method with Example
  19. Java Thread Class boolean isInterrupted() method with Example
  20. Java Thread Class final boolean isAlive() method with Example
  21. Java Thread Class final boolean isDaemon() method with Example
  22. Java Thread Class final void setDaemon(boolean thread_status) method with Example
  23. Java Thread Class final void join() method with Example
  24. Java Thread Class final synchronized void join(long time_in_ms) method with Example
  25. Java Thread Class final void join(long time_in_ms, int time_in_ns) method with Example
  26. Java Thread Class public void run() method with Example
  27. Java Thread Class public void start() method with Example
  28. Java Thread Class String toString() method with Example
  29. Java Thread Class static native void yield() method with Example
  30. Java Thread Class static void sleep(long time_in_ms) method with Example
  31. Java Thread Class static void sleep(long time_in_ms, int time_in_ns) method with Example
  32. Java Thread Class static void setDefaultUncaughtExceptionHandler(Thread.UncaughtExceptionHandler excep_handler) method with Example
  33. Java Thread Class public void setUncaughtExceptionHandler(Thread.UncaughtExceptionHandler excep_handler) method with Example
  34. Java Thread Class final void setName(String thread_name) method with Example
  35. Java Thread Class final void setPriority(int priority) method with Example
  36. Java Thread Class void setContextClassLoader(ClassLoader loader) method with Example

Java String

  1. Operations on string in Java (functions/methods of String class).
  2. Getting character by Index from string in Java.
  3. Convert a character to the string in Java
  4. Convert a character array to the string in Java

Java String Class Methods

  1. Java String startsWith() Method with Example
  2. Java String endsWith() Method with Example
  3. Java String toUpperCase() Method with Example
  4. Java String toLowerCase() Method with Example
  5. Java String charAt() Method with Example
  6. Java String compareTo() Method with Example
  7. Java String compareToIgnoreCase() Method with Example
  8. Java String getBytes() Method with Example
  9. Java String getChars() Method with Example
  10. Java String concat() Method with Example
  11. Java String copyValueOf() Method with Example
  12. Java String indexOf(int ch) Method with Example
  13. Java String indexOf(int ch, int fromIndex) Method with Example
  14. Java String indexOf(String substr) Method with Example
  15. Java String indexOf(String substr, int fromIndex) Method with Example

Java Object Class Methods

  1. Java Object Class boolean equals(Object o) method with Example
  2. Java Object Class int hashCode() method with Example
  3. Java Object Class protected void finalize() throws Throwable method with Example
  4. Java Object Class String toString() method with Example
  5. Java Object Class final void wait() method with Example
  6. Java Object Class final void wait(long ms) method with Example
  7. Java Object Class final void wait(long ms , int ns) method with Example
  8. Java Object Class final Class getClass() method with Example

Java StringBuffer Class Methods

  1. Java StringBuffer append(String s) method with Example
  2. Java StringBuffer int capacity() method with Example
  3. Java StringBuffer char charAt(int index) method with Example
  4. Java StringBuffer int codePointAt(int index) method with Example
  5. Java StringBuffer int codePointBefore(int index) method with Example
  6. Java StringBuffer int codePointCount(int index1 , int index 2) method with Example
  7. Java StringBuffer insert(int offset , String s) method with Example
  8. Java StringBuffer int length() method with Example
  9. Java StringBuffer reverse() method with Example
  10. Java StringBuffer delete(int spos , int epos) method with Example
  11. Java StringBuffer deleteCharAt(int index) method with Example
  12. Java StringBuffer void ensureCapacity(int mincap) method with Example
  13. Java StringBuffer void setLength(int newlen) method with Example
  14. Java StringBuffer void trimToSize() method with Example
  15. Java StringBuffer int lastIndexOf(String s) method with Example
  16. Java StringBuffer int lastIndexOf(String s , int srcindex) method with Example
  17. Java StringBuffer replace(int spos, int epos , String s) method with Example
  18. Java StringBuffer CharSequence subSequence(int spos, int epos) method with Example

Java File Class Methods

  1. Java File Class boolean createNewFile() method with Example
  2. Java File Class boolean delete() method with Example
  3. Java File Class String getName() method with Example
  4. Java File Class boolean canExecute() method with Example
  5. Java File Class boolean canRead() method with Example
  6. Java File Class boolean canWrite() method with Example
  7. Java File Class boolean setExecutable(boolean exec_file) method with Example
  8. Java File Class boolean setExecutable(boolean exec_file , boolean owner_access) method with Example
  9. Java File Class boolean setReadable(boolean read_file , boolean owner_read) method with Example
  10. Java File Class boolean setReadable(boolean read_file) method with Example
  11. Java File Class boolean isDirectory() method with Example
  12. Java File Class boolean isFile() method with Example
  13. Java File Class boolean isHidden() method with Example
  14. Java File Class String[] list() method with Example
  15. Java File Class String[] list(FilenameFilter fnf) method with Example
  16. Java File Class File[] listFiles() method with Example
  17. Java File Class boolean exists() method with Example
  18. Java File Class String getParent() method with Example
  19. Java File Class File getParentFile() method with Example
  20. Java File Class File[] listFiles(FileFilter ff) method with Example
  21. Java File Class File[] listFiles(FilenameFilter fnf) method with Example
  22. Java File Class String getPath() method with Example
  23. Java File Class String getAbsolutePath() method with Example
  24. Java File Class long getFreeSpace() method with Example
  25. Java File Class int compareTo(File filepath) method with Example
  26. Java File Class static File createTempFile(String file_name, String file_extension) method with Example
  27. Java File Class long length() method with Example
  28. Java File Class boolean mkdir() method with Example
  29. Java File Class boolean isAbsolute() method with Example
  30. Java File Class long lastModified() method with Example
  31. Java File Class boolean renameTo(File new_pathname) method with Example
  32. Java File Class boolean setLastModified(long set_new_time) method with Example
  33. Java File Class boolean setReadOnly() method with Example
  34. Java File Class URI toURI() method with Example
  35. Java File Class int compareTo(Object o) method with Example
  36. Java File Class boolean mkdirs() method with Example
  37. Java File Class void deleteOnExit() method with Example

Java LinkedList

  1. Java LinkedList addFirst() method with Example
  2. Java LinkedList addLast() method with Example
  3. Java LinkedList getFirst() method with Example
  4. Java LinkedList getLast() method with Example
  5. Java LinkedList boolean add(Object o) method with Example
  6. Java LinkedList boolean remove(Object o) method with Example
  7. Java LinkedList boolean addAll(Collection c) method with Example
  8. Java LinkedList boolean addAll(int index, Collection c) method with Example
  9. Java LinkedList void add(int index, Object o) method with Example
  10. Java LinkedList void clear() method with Example
  11. Java LinkedList Object clone() method with Example
  12. Java LinkedList boolean contains(Object o) method with Example
  13. Java LinkedList public boolean offerFirst(Object o) method with Example
  14. Java LinkedList public boolean offerLast(Object o) method with Example
  15. Java LinkedList public boolean offer(Object o) method with Example
  16. Java LinkedList public int indexOf(Object o) method with Example
  17. Java LinkedList public int lastIndexOf(Object o) method with Example
  18. Java LinkedList public Object peekFirst() method with Example
  19. Java LinkedList public Object peekLast() method with Example
  20. Java LinkedList public Object peek() method with Example
  21. Java LinkedList public Object pollFirst() method with Example
  22. Java LinkedList public Object pollLast() method with Example
  23. Java LinkedList public Object poll() method with Example
  24. Java LinkedList int size() method with Example
  25. Java LinkedList Object pop() method with Example
  26. Java LinkedList Object set(int index , Object o) method with Example
  27. Java LinkedList void push(Object o) method with Example
  28. Java LinkedList Object[] toArray() method with Example
  29. Java LinkedList boolean removeFirstOccurrence(Object o) method with Example
  30. Java LinkedList boolean removeLastOccurrence(Object o) method with Example
  31. Java LinkedList Object element() method with Example
  32. Java LinkedList Object get(int index) method with Example
  33. How to remove a SubList from a List in Java?

Dynamic Programming

  1. Coin change problem and solution in Java.
  2. Solution of minimum spanning tree problem in Java using Kruskal's Algorithm.

Eclipse

  1. Start a java project in eclipse.
  2. Implementing a java class in eclipse.
  3. A JavaScript file in eclipse.
  4. Servlet file in Eclipse Mars.
  5. Dynamic Web project in eclipse.



Comments and Discussions

Ad: Are you a blogger? Join our Blogging forum.
Learn PCB Designing: PCB DESIGNING TUTORIAL




Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing » Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates

© https://www.includehelp.com some rights reserved.