How to install Java on Ubuntu
kodingwindow@kw:~$ sudo apt -y install openjdk-21-jre openjdk-21-jdk ... root@kw:/home/kodingwindow# java --version openjdk 21.0.3 2024-04-16 OpenJDK Runtime Environment (build 21.0.3+9-Ubuntu-1ubuntu1) OpenJDK 64-Bit Server VM (build 21.0.3+9-Ubuntu-1ubuntu1, mixed mode, sharing)
Java Fundamentals
Java Hello World programJava Hello World program without using a semicolonJava program to perform the arithmetic operationsJava program to perform the boolean operations
Show More »
Java Control Statements
Java program to check the equality of given numbersJava program to check the given number is positive or negativeJava program to check the given number is even or odd
Java Loops
Java program to print the even and odd numbersJava program to print the numbers using for loopJava program to print the star pyramid patternsJava program to find the factorial of a given number
Java Strings
Java program to concatenate the given stringsJava implementation of the indexOf methodJava implementation of the Character classJava implementation of the charAt method
Show More »
Java Arrays
Java program to print the sum of all numbers in a given arrayJava program to find the min and max number from a given arrayJava program to print the length of all strings from a given arrayJava program to print the transpose of a given matrix
Java Classes
Java program to demonstrate the use of Math class methodsJava program to demonstrate the use of constructorJava implementation of final and static keywordsJava implementation of Scanner close method
Show More »
Java Methods
Java program to get the Operating System detailsHow to get the size of heap in JavaJava program to format the text blocks strings using formatted() method
Java Inheritance
Java program for Single InheritanceJava program for Multilevel InheritanceJava program for Hierarchical InheritanceJava program for Hybrid Inheritance (Multilevel and Hierarchical)
Java Polymorphism
Implementation of Java method overloadingHow to overload the main() method in JavaImplementation of Java method overriding
Java Abstraction
Java program for Abstract classJava program for InterfaceHow to achieve multiple inheritance in Java using interfacesHow to achieve multiple inheritance in Java using interfaces and default methods
Java Collections
Implementation of Java ArrayList classImplementation of Java LinkedList classImplementation of Java HashSet classImplementation of Java LinkedHashSet class
Show More »
Java Exception Handling
Java program to demonstrate the use of try and catch blocksJava program to demonstrate the use of finally blockJava program to demonstrate the use of nested try, catch, and finally blocksJava program to handle the ArithmeticException
Show More »
Java Regular Expressions
Implementation of Java Regular ExpressionsJava program to accept a valid blood group using regex
Java Multithreading
Java program to extends the Thread classJava program for Runnable interfaceJava program for getName(), getId() and getPriority() methodsJava program for join() and sleep() methods
Show More »
Java AWT and Swing Graphics
Java program to draw a Line using Graphics2D classJava program to draw a Curve using Graphics2D classJava program to draw a Circle using Graphics2D classJava program to draw a Rectangle using Graphics2D class
Show More »
Java Database Connectivity (JDBC)
Java MySQL to connect, create database, and tableJava MySQL to insert and retrieve the records from a tableJava MySQL to update the table recordsJava MySQL to perform JDBC CRUD operations
Show More »
Advertisement