Skip to content

br0ns0/Java_code_snippets

Repository files navigation

Java_code_snippets

This is a code reference while learning Java




JavaCup_1

I am currently writing this code while learning Java core.

Java_code_snippets can be easily referenced in attempt to understand different concepts and syntax I will be revisiting this code at some point to refactor it according to my Java literacy.


CODE ALSO AVAILABLE ON PASTEBIN

Direct Links:

NAME:

  1. AbsoluteValue==> /if condition /Math.abs(double n)

  2. AddNumbers==> /return total sum /for loop counter

  3. CalculateTip==> /printf

  4. CheckWifi==> /for loop /boolean /if condition /break

  5. CountingDown==> /for loop

  6. EvenNumbers==> /for loop

  7. Factorial==> /for loop

  8. FastestTime==> /array search /for loop /if statment

  9. Fetch (DOG)==> /array counter/this.

  10. FindRange ==>/for loop /nested if staments

  11. Greeting==> /String concatonation

  12. InstanceOfFirstOccurence ==> /for loop /if condition

  1. LongestName==> array search /for-loop /if condition

  2. OverallStudentAverage==> /nested loops with 2D arrays

  1. PrintInReverse /collections.reverse()

  2. PyramidBlocks==> /totalBlocks in all levels / for loop

  1. RaiseAlarms==> /for loop /while loop
  1. RandomDiceRoll==> / six-sided /random number generator
  1. RollASix==> /while loop /if condition /break /return boolean
  1. SquarePattern==> /nested loops
  1. StudentSubjectAverage==>/Looping over 2D array /for loop
  1. Yahtzee ==>/while loop/ random number generator
  1. YearsTilOneMillion==>/while loop
  1. Monopoly==>/Math.random() /recursion
  1. TicTacToe==>for loop/Character.toUpperCase()
  1. DayOfWeek==>ONE_LINER!!==>LocalDate.of
  1. ReverseWord==>ONE_LINER!!==>StringBuilder
  1. CurrencyConverter==>NumberFormat/Locale
  1. PhoneBook==>Map/HashMap
  1. NumberGame==>Math.random/boolean

About

my code reference for learning Java

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages