Hello! I’m new to programming. Currently, I’m taking a Udemy course on Java hosted by Tim B. I have some questions on concepts I’m trying to understand better. Right now I run all of my code through IntelliJ Ideas.
How do you know when to use int vs long vs double? I understand they hold different values and that double is more suited for decimals, but I don’t understand why long is used in some instructional videos when it seems like an int could be used as well.
What is the difference between private & public? I’m not really understanding when to use one over the other.
Please go easy on me, as I’m sure these are simple concepts to most of you.