Skip to main content

Posts

Showing posts from January, 2022

A Silly New Year Wish with a Java code

TJ's silly new year wish Happy New Year y'all!!! package com.tjisblogging ;   import java.time.LocalDate ; import java.time.Month ; import java.util.Vector ;   public class NewYear {   private static final LocalDate END_OF_2022 = LocalDate . of ( 2022 , Month. DECEMBER , 31 ) ;   public static void main ( String [ ] args ) { Life yourLife = Life. getInstance ( ) ; while ( ! LocalDate. now ( ) . equals ( END_OF_2022 ) ) { yourLife. push ( "Love" ) ; yourLife. push ( "Joy" ) ; yourLife. push ( "Happiness" ) ; yourLife. push ( "Prosperity" ) ; yourLife. push ( "Money" ) ; yourLife. push ( "Health" ) ; } } }   class Life { private Vector < String > lifeQueue = new Vector <> ( ) ; private static Life instance = new Life ( ) ;   private Life ( ) { }  ...