Runtime class in Java | Lecture 9 | Step by Step java tutorial

Published: 09 November 2023
on channel: Tech Learning
40
like

Java Tutorial For Beginners 9(Step by Step tutorial) | Runtime class in Java | Lecture 9
#java #javaforbeginners #intellij

Lecture 9:
Java Runtime class is used to interact with java runtime environment. Java Runtime class provides methods to execute a process, invoke GC, get total and free memory etc.

1. open notepad
Runtime.getRuntime().exec("notepad");//will open a new notepad

2. add shutdown hook
public static void main(String[] args) {
System.out.println("Start");
Runtime.getRuntime().addShutdownHook(new Thread(){
public void run(){
System.out.println("End");
}
});
System.out.println("Mid");
}

3. availableProcessors
Runtime.getRuntime().availableProcessors()

4. freeMemory() and totalMemory() method

Lecture 1: Installing JDK | First java program | intellij java
   • Java Tutorial For Beginners 1(Step by...  

Lecture 2: Java Variables and Data Types in Java
   • Video  

Lecture 3: control statements in java
   • Java Tutorial For Beginners 3 | contr...  

Lecture 4: OOPs concept in Java
   • OOPs concept in Java | Lecture 4 #jav...  

Lecture 5: Java Arrays
   • Arrays in Java | Lecture 5 #java #jav...  

Lecture 6: Exception Handling in Java
   • Exception Handling in Java | Lecture ...  

Lecture 7: Multithreading in Java
   • Multithreading in Java | Lecture 7 | ...  

Lecture 8: Garbage Collection in Java
   • Garbage Collection in Java | Lecture ...  

#java #javaprogramming #javatutorial #javalanguage #jdk #intellij #intellijidea #learnjava #javaforbeginners #learnjavaonline #javainstall #javabeginner #javabeginners #code #coding #learnprogramming #programming

Tags:
java
install java
install jdk
java 17
java beginner
java first program
java environment variables
intellij
intellij java
java tutorial
java tutorials
java tutorial for begineers
java full course
java classes
java for begineers
java scripting tutorial for begineers
java programming
java course
java setup for windows 10
java setup for windows
java setup in intellij
java setup
java environment setup
java environment setting class path
jdk installation in windows 10
jdk download
jdk in java
jdk 11 lakh
jdk 17 installation in windows 10
java path set
java path setting in windows 10
java path setup
java learning
java learning for beginners
java learn coding
java learning step by step
java learning path
intellij idea
intellij idea tutorial java
intellij installation
intellij idea setup for java
intellij idea tutorial
intellij tutorial
intellij java
java first program
intellij for java
intellij first java project


On this page of the site you can watch the video online Runtime class in Java | Lecture 9 | Step by Step java tutorial with a duration of hours minute second in good quality, which was uploaded by the user Tech Learning 09 November 2023, share the link with friends and acquaintances, this video has already been watched 40 times on youtube and it was liked by like viewers. Enjoy your viewing!