My uplink has not been uplinking, sorry for the delay. At your skills, there is several things that can be done: In short, if you can declare it you can pass it to a method. Public Instance methods are just methods for now, all that access modifier stuff and so on is just to keep you with something to study. I just put everything in one file and do not bother with all the OO stuff until I have enough that it has to be disentangled to make it work.
At that point, I study OO.
The code looks the same for true / false and so on. Just be careful as String compare will get you ahead of where you are at right now.
The
== operator will fail unless it is only used on what is called primitive types. If you can make something a class, then we use what is called equals();
I posted the ternary operator, which you found, to test your willingness to look something up. We do ( in general ) do it like this:
// Skipped a bunch of stuff for get-going
class One {}
class Two {}
class Three{}
class Four {
public static void main(....
One one = new One();
Two two = new Two();
Three three = new Three();
boolean anEqualsTest(One aOneClassInstace)
{
if two.equals(aOneClassInstace)
{
return true;
}
else
{
if(three.equals(aOneClassInstace))
{
//..............
}
I omitted a bunch of code, this will be too much but yes we can is the answer to what your questions pose.