Uploaded December 2024 | Updated September 2026, 2 weeks ago
#java #javatutorial #javacourse
This is an introduction to the concept of generics in Java.
// Generics = A concept where you can write a class, interface, or method
// that is compatible with different data types.
// type parameter (placeholder that gets replaced with a real type)
// type argument (specifies the type)
#java #javatutorial #javacourse
This is an introduction to the concept of generics in Java.
// Generics = A concept where you can write a class, interface, or method
// that is compatible with different data types.
// type parameter (placeholder that gets replaced with a real type)
// type argument (specifies the type)

![Matplotlib scatter plots in 6 minutes! ✨
#python #coding #matplotlib
In this video we will create a basic scatter plot using Matplotlib.
Here is some sample data you can copy and paste for your convenience:
x1 = np.array([0, 1, 1, 2, 3, 4, 5, 6, 7, 7, 8])
y1 = np.array([55, 60, 65, 62, 68, 70, 75, 78, 82, 85, 87])
x2 = np.array([0, 1, 2, 2, 3, 4, 5, 6, 7, 8, 8])
y2 = np.array([50, 58, 65, 70, 72, 78, 83, 88, 92, 95, 97]) Matplotlib scatter plots in 6 minutes! ✨](https://i.ytimg.com/vi/HHrG5W530fk/mqdefault.jpg)

![Learn Java timertasks in 6 minutes! ⏲️
#java #javatutorial #javacourse
import java.util.Timer;
import java.util.TimerTask;
public class Main {
public static void main(String[] args) {
// Timer = Class that schedules tasks at specific times or periodically
// Useful for: sending notifications, scheduled updates, repetitive actions
// TimerTask = Represents the task that will be executed by the Timer
// You will extend the TimerTask class to define your task
// Create a subclass of TimerTask and @Override run()
Timer timer = new Timer();
TimerTask task = new TimerTask(){
@Override
public void run(){
System.out.println(Hello!);
}
};
timer.schedule(task, 0, 1000); // (task, delay, period)
}
} Learn Java timertasks in 6 minutes! ⏲️](https://i.ytimg.com/vi/HjzcZkzRDYs/mqdefault.jpg)

![Code a Java compound interest calculator in 7 minutes! 💸
#java #javatutorial #javacourse
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// Compound interest calculator
Scanner scanner = new Scanner(System.in);
double principal;
double rate;
int timesCompounded;
int years;
double amount;
System.out.print(Enter the principal amount: );
principal = scanner.nextDouble();
System.out.print(Enter the interest rate (in %): );
rate = scanner.nextDouble() / 100;
System.out.print(Enter the # of times compounded per year: );
timesCompounded = scanner.nextInt();
System.out.print(Enter the # of years: );
years = scanner.nextInt();
amount = principal * Math.pow(1 + rate / timesCompounded, timesCompounded * years);
System.out.printf(The amount after %d years is $%.2f, years, amount);
scanner.close();
}
} Code a Java compound interest calculator in 7 minutes! 💸](https://i.ytimg.com/vi/IgdIfGW-cVU/mqdefault.jpg)



![METHODS in Java are easy 📞
#java #javatutorial #javacourse
00:00:00 introduction
00:01:38 methods
00:03:37 arguments
00:04:37 parameters
00:08:23 return
00:10:30 example 2
00:11:10 example 3
00:12:41 example 4
public class Main {
public static void main(String[] args){
// method = a block of reusable code that is executed when called ()
happyBirthday(Spongebob, 30);
}
static void happyBirthday(String name, int age){
System.out.println(Happy Birthday to you!);
System.out.printf(Happy Birthday dear %s!n, name);
System.out.printf(You are %d years old!n, age);
System.out.println(Happy Birthday to you!n);
}
static double square(double number){
return number * number;
}
static double cube(double number){
return number * number * number;
}
static String getFullName(String first, String last){
return first + + last;
}
} METHODS in Java are easy 📞](https://i.ytimg.com/vi/JKecvKiNX2I/mqdefault.jpg)
