Uploaded December 2024 | Updated September 2026, 1 week ago
#java #javatutorial #javacourse
public class Main {
public static void main(String[] args) {
// Method overriding = When a subclass provides its own
// implementation of a method that is already defined.
// Allows for code reusability and gives specific implementations.
Dog dog = new Dog();
Cat cat = new Cat();
Fish fish = new Fish();
dog.move();
cat.move();
fish.move();
}
}
public class Animal {
void move(){
System.out.println("This animal is running");
}
}
public class Dog extends Animal{
}
public class Cat extends Animal{
}
public class Fish extends Animal{
@Override
void move(){
System.out.println("This animal is swimming");
}
}
#java #javatutorial #javacourse
public class Main {
public static void main(String[] args) {
// Method overriding = When a subclass provides its own
// implementation of a method that is already defined.
// Allows for code reusability and gives specific implementations.
Dog dog = new Dog();
Cat cat = new Cat();
Fish fish = new Fish();
dog.move();
cat.move();
fish.move();
}
}
public class Animal {
void move(){
System.out.println("This animal is running");
}
}
public class Dog extends Animal{
}
public class Cat extends Animal{
}
public class Fish extends Animal{
@Override
void move(){
System.out.println("This animal is swimming");
}
}
![Code a Java temperature converter in 7 minutes! 🌡️
#java #javatutorial #javacourse
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
double temp;
double newTemp;
String unit;
System.out.print(Enter the temperature: );
temp = scanner.nextDouble();
System.out.print(Convert to Celsius or Fahrenheit? (C or F): );
unit = scanner.next().toUpperCase();
// (condition) ? true : false
newTemp = (unit.equals(C)) ? (temp - 32) * 5 / 9 : (temp * 5 / 9) + 32;
System.out.printf(%.1f°%s, newTemp, unit);
scanner.close();
}
} Code a Java temperature converter in 7 minutes! 🌡️](https://i.ytimg.com/vi/iF9OVaBdxBQ/mqdefault.jpg)

![Learn OVERLOADED CONSTRUCTORS in 6 minutes! 🛠️
#java #javatutorial #javacourse
public class Main {
public static void main(String[] args) {
// overloaded constructors = Allow a class to have multiple constructors
// with different parameter lists.
// Enable objects to be initialized in various ways.
User user1 = new User(Spongebob);
User user2 = new User(Patrick, PStar@aol.com);
User user3 = new User(Sandy, SCheeks@gmail.com, 27);
User user4 = new User();
System.out.println(user1.username);
System.out.println(user1.email);
System.out.println(user1.age);
System.out.println(user2.username);
System.out.println(user2.email);
System.out.println(user2.age);
System.out.println(user3.username);
System.out.println(user3.email);
System.out.println(user3.age);
System.out.println(user4.username);
System.out.println(user4.email);
System.out.println(user4.age);
}
}
public class User {
String username;
String email;
int age;
User(){
this.username = Guest;
this.email = Not provided;
this.age = 0;
}
User(String username){
this.username = username;
this.email = Not provided;
this.age = 0;
}
User(String username, String email){
this.username = username;
this.email = email;
this.age = 0;
}
User(String username, String email, int age){
this.username = username;
this.email = email;
this.age = age;
}
} Learn OVERLOADED CONSTRUCTORS in 6 minutes! 🛠️](https://i.ytimg.com/vi/iLrY412dFwo/mqdefault.jpg)
![Python Full Course for free 🐍
#python #tutorial #beginners
Python tutorial for beginners full course 2024
*Learn Python in 1 HOUR* ⏱ : https://www.youtube.com/watch?v=8KCuHHeC_M0
*My original Python 12 Hour course* 🐍 : https://www.youtube.com/watch?v=XKHEtdqhLK8
*Full Python playlist* 📃: https://www.youtube.com/watch?v=Sg4GMVMdOPo&list=PLZPZq0r_RZOOkUQbat8LyQii36cJf2SWT
[⭐ = project]
#1 (00:00:00) python tutorial for beginners 🐍
#2 (00:05:49) variables ❎
#3 (00:16:05) type casting 💱
#4 (00:21:15) user input ⌨️
#5 (00:32:42) ⭐ madlibs game 📖
#6 (00:37:55) arithmetic & math 📐
#7 (00:51:46) if statements 🤔
#8 (01:00:06) ⭐ calculator program 🧮
#9 (01:05:59) ⭐ weight conversion program 🏋️
#10 (01:09:59) ⭐ temperature conversion program 🌡️
#11 (01:13:58) logical operators 🌦️
#12 (01:21:28) conditional expressions ❓
#13 (01:27:03) string methods 〰️
#14 (01:39:08) string indexing ✂️
#15 (01:46:35) format specifiers 💬
#16 (01:51:55) while loops ♾️
#17 (01:58:53) ⭐ compound interest calculator 💵
#18 (02:06:28) for loops 🔁
#19 (02:11:33) ⭐ countdown timer program ⌛
#20 (02:17:28) nested loops ➿
#21 (02:23:03) lists, sets, and tuples 🍎
#22 (02:38:08) ⭐ shopping cart program 🛒
#23 (02:45:21) 2D collections ⬜
#24 (02:53:59) ⭐ quiz game 💯
#25 (03:03:27) dictionaries 📙
#26 (03:11:33) ⭐ concession stand program 🍿
#27 (03:19:42) random numbers 🎲
#28 (03:24:16) ⭐ number guessing game 🔢
#29 (03:32:37) ⭐ rock, paper, scissors game 🗿
#30 (03:42:06) ⭐ dice roller program ⚂
#31 (03:52:12) functions 📞
#32 (04:02:50) default arguments 👍
#33 (04:08:56) keyword arguments 🗝️
#34 (04:15:40) *args & **kwargs 📦
#35 (04:30:33) iterables 🔂
#36 (04:37:04) membership operators 🔎
#37 (04:45:56) list comprehensions 📃
#38 (04:56:17) match-case statements 📆
#39 (05:02:13) modules 📨
#40 (05:08:51) scope resolution 🔬
#41 (05:14:22) if name main: 📥
#42 (05:23:34) ⭐ banking program 💰
#43 (05:38:34) ⭐ slot machine 🎰
#44 (05:58:45) ⭐ encryption program 🔐
#45 (06:07:26) ⭐ hangman game 🕺
#46 (06:32:32) python object oriented programming 🚗
#47 (06:44:50) class variables 🎓
#48 (06:53:06) inheritance 👨👦👦
#49 (07:00:02) multiple inheritance 🐟
#50 (07:08:04) super() 🔴
#51 (07:21:10) polymorphism 🎭
#52 (07:29:15) duck typing 🦆
#53 (07:33:34) static methods ⚡
#54 (07:39:31) class methods 🏫
#55 (07:46:16) magic methods 🌟
#56 (07:59:51) @property ⚙️
#57 (08:07:33) decorators 🎊
#58 (08:14:57) exception handling 🚦
#59 (08:20:46) file detection 🕵️♂️
#60 (08:27:47) writing files ✍
#61 (08:41:33) reading files 🔍
#62 (08:48:29) dates & times 📅
#63 (08:54:46) ⭐ alarm clock ⏰
#64 (09:05:03) multithreading 🧵
#65 (09:13:45) request API data ↩️
#66 (09:22:19) PyQt5 GUI intro 🖥️
#67 (09:31:27) PyQt5 labels 🏷️
#68 (09:40:23) PyQt5 images 📷
#69 (09:46:28) PyQt5 layout managers 🧲
#70 (09:53:07) PyQt5 buttons 🛎️
#71 (10:00:12) PyQt5 checkboxes ✅
#72 (10:06:42) PyQt5 radio buttons 🔘
#73 (10:15:55) PyQt5 line edits 💬
#74 (10:21:55) PyQt5 CSS styles 🎨
#75 (10:32:48) ⭐ digital clock program 🕒
#76 (10:48:38) ⭐ stopwatch program ⏱
#77 (11:06:05) ⭐ weather API app ☀️
Python Interpreter: https://www.python.org/
PyCharm IDE: https://www.jetbrains.com/pycharm/
*Copyright Disclaimer*:
This video is the intellectual property of Bro Code. All rights reserved. No part of this video may be reproduced, distributed, or transmitted in any form or by any means, including but not limited to recording, uploading, or other electronic or mechanical methods, without my written permission, except in the case of brief quotations embodied in critical reviews and certain other noncommercial uses permitted by copyright law. Python Full Course for free 🐍](https://i.ytimg.com/vi/ix9cRaBkVe0/mqdefault.jpg)




![Lets code an alarm clock with Java! ⏰
#java #javatutorial #javacourse
This is a beginners project to help us learn and understand Object Oriented Programming and Threading. We will only be using topics we have discussed in past videos in this series.
import java.time.LocalTime;
import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeParseException;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// JAVA ALARM CLOCK
Scanner scanner = new Scanner(System.in);
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(HH:mm:ss);
LocalTime alarmTime = null;
String filePath = A Caring Friend.wav;
while(alarmTime null){
try{
System.out.print(Enter an alarm time (HH:MM:SS): );
String inputTime = scanner.nextLine();
alarmTime = LocalTime.parse(inputTime, formatter);
System.out.println(Alarm set for + alarmTime);
}
catch(DateTimeParseException e){
System.out.println(Invalid format. Please use HH:MM:SS);
}
}
AlarmClock alarmClock = new AlarmClock(alarmTime, filePath, scanner);
Thread alarmThread = new Thread(alarmClock);
alarmThread.start();
}
}
import javax.sound.sampled.*;
import java.awt.*;
import java.io.File;
import java.io.IOException;
import java.time.LocalTime;
import java.util.Scanner;
public class AlarmClock implements Runnable{
private final LocalTime alarmTime;
private final String filePath;
private final Scanner scanner;
AlarmClock(LocalTime alarmTime, String filePath, Scanner scanner){
this.alarmTime = alarmTime;
this.filePath = filePath;
this.scanner = scanner;
}
@Override
public void run(){
while(LocalTime.now().isBefore(alarmTime)){
try {
Thread.sleep(1000);
LocalTime now = LocalTime.now();
System.out.printf(r%02d:%02d:%02d,
now.getHour(),
now.getMinute(),
now.getSecond());
}
catch (InterruptedException e) {
System.out.println(Thread was interrupted);
}
}
System.out.println(n*ALARM NOISES*);
playSound(filePath);
}
private void playSound(String filePath){
File audioFile = new File(filePath);
try(AudioInputStream audioStream = AudioSystem.getAudioInputStream(audioFile)){
Clip clip = AudioSystem.getClip();
clip.open(audioStream);
clip.start();
System.out.print(Press *Enter* to stop the alarm: );
scanner.nextLine();
clip.stop();
scanner.close();
}
catch(UnsupportedAudioFileException e){
System.out.println(Audio file format is not supported);
}
catch(LineUnavailableException e){
System.out.println(Audio is unavailable);
}
catch(IOException e){
System.out.println(Error reading audio file);
}
}
} Lets code an alarm clock with Java! ⏰](https://i.ytimg.com/vi/lGG0LAJf0uE/mqdefault.jpg)

