Uploaded December 2024 | Updated September 2026, 1 week ago
#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();
}
}
#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();
}
}

![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)


