Learn DATES & TIMES with Java in 8 minutes! 📆

  Рет қаралды 2,168

Bro Code

Bro Code

Күн бұрын

Пікірлер: 20
@BroCodez
@BroCodez Ай бұрын
import java.time.Instant; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.LocalTime; import java.time.format.DateTimeFormatter; public class Main { public static void main(String[] args) { // How to work with DATES & TIMES using Java // (LocalDate, LocalTime, LocalDateTime, UTC timestamp) // Current date LocalDate date = LocalDate.now(); System.out.println(date); // Current time LocalTime time = LocalTime.now(); System.out.println(time); // Current date and time LocalDateTime dateTime = LocalDateTime.now(); System.out.println(dateTime); // UTC timestamp Instant instant = Instant.now(); System.out.println(instant); // Custom format DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd-MM-yyyy HH:mm:ss"); String newDateTime = dateTime.format(formatter); System.out.println(newDateTime); // Comparing dates & times LocalDateTime date1 = LocalDateTime.of(2024, 12, 25, 12, 0, 0); // CHRISTMAS LocalDateTime date2 = LocalDateTime.of(2025, 1, 1, 0, 0, 0); // NEW YEARS DAY if(date1.isBefore(date2)){ System.out.println(date1 + " is earlier than " + date2); } else if(date1.isAfter(date2)){ System.out.println(date1 + " is later than " + date2); } else if(date1.isEqual(date2)){ System.out.println(date1 + " is equal to " + date2); } } }
@Sl33pySt3rdust
@Sl33pySt3rdust Ай бұрын
its facinating that you can do so much with java, read files, make audio players, use dates & time its really underrated
@SmortMen
@SmortMen Ай бұрын
"Underrated" you say. Hmm, I don't think so.
@Cubic123
@Cubic123 Ай бұрын
whenever i learn a new language this guy makes it 100x easier istg
@Hnxzxvr
@Hnxzxvr Ай бұрын
Bro I just started learning java(as in I quit) and you make it so easy to make programs! I haven’t watched a single tutorial except yours and I can build simple programs on my own
@loona_sims
@loona_sims Ай бұрын
Could you do a series of data structure and algorithms tutorial for Python 😢 There aren’t systematic & well explained introduction on KZbin, and I am hoping maybe someday you could fill the gap❤
@donchuan7528
@donchuan7528 Ай бұрын
can you make a assembly language tutorial pls.
@avian8354
@avian8354 9 күн бұрын
😭💀💀💀
@strain69
@strain69 Ай бұрын
could you please make a course on django
@shady5063
@shady5063 Ай бұрын
Can you make a video about CompleatableFuture in java
@Abdullah-j7h5n
@Abdullah-j7h5n Ай бұрын
Hello Mr Bro Code, I was wondering whether i can use a mp4 converter to download some videos as i am travelling and have no internet. I am currently doing my A-levels and love your content
@KGB223
@KGB223 Ай бұрын
Bro next video suggestion - Devops
@arpitamarjeet.
@arpitamarjeet. Ай бұрын
Bro next time data science Full course please 🙏
@Андрей-с6х7ч
@Андрей-с6х7ч Ай бұрын
May I ask about OpenGL guide? (C++ or Java)
@gustavoksbr
@gustavoksbr Ай бұрын
Bro, how can I help you financially?
@dibeshranjandas4278
@dibeshranjandas4278 Ай бұрын
bro please continue your react series please please please please please pleaseplease pleaseplease pleaseplease pleaseplease please
@Veikko_010
@Veikko_010 Ай бұрын
December 17 2024
@deadbeat008
@deadbeat008 Ай бұрын
12/19/2024
@riceuu
@riceuu 13 күн бұрын
January 19 2025
@gawrysiak100
@gawrysiak100 Ай бұрын
I liked the video. I need you to like my comment now
Learn Java ANONYMOUS CLASSES in 5 minutes! 🕵️‍♂️
5:02
Learn Java ARRAYLISTS in 9 minutes! 📃
9:40
Bro Code
Рет қаралды 2,9 М.
번쩍번쩍 거리는 입
0:32
승비니 Seungbini
Рет қаралды 182 МЛН
How to WRITE FILES with Java in 8 minutes! ✍
8:32
Bro Code
Рет қаралды 2,7 М.
Learn Java THREADING in 10 minutes! 🧵
10:21
Bro Code
Рет қаралды 2,7 М.
How to Import Fonts from Google Fonts with @import
5:22
Filipe Vilela
Рет қаралды 73
All Machine Learning Models Clearly Explained!
22:23
AI For Beginners
Рет қаралды 34
Learn Java HASHMAPS in 10 minutes! 🗺️
10:31
Bro Code
Рет қаралды 2,9 М.
Learn EXCEPTION HANDLING in 8 minutes! ⚠️
8:02
Bro Code
Рет қаралды 2,7 М.
Learn Java MULTITHREADING in 8 minutes! 🧶
8:01
Bro Code
Рет қаралды 2,4 М.