The difference between next() and nextLine()nextLine() will store the complete sentence inputted in the String variable whereas next() will only save the first word inputted and the rest will go in an input buffer. If you use a next() then a next(), import java.util.Scanner; public class test1...Dec 23, 2024·2 min read
When using a return and an if statement, make sure that there is an "else" for unknown outcome for the function to workDec 18, 2024·1 min read
A case statement is faster than a nested ifWe never learnt in school, I will need to do a lot more of researches about the thing I don’t know.Dec 14, 2024·1 min read