Heyyy, I'm back. Getting the hang of this java thing. Anyways, I have a few questions, I'll leave my hardest for last.
So, I believe I'm having an overloading method issue here.
I'm getting a "class, interface, or enum expected" error on the lines with asterisks. I'm creating overloading methods, but I believe that as long as the arguments are different, then I'm okay. I have a double/int in the first (fine) and a int/int in the second. Little confused.
And lastly... how do you launch a browser? I've been searching, and there seems to be no basic answer to this.
Man... that's ugly. Anyways, but that's for a Mac. Instead, I'm trying to make a method to call instead of putting it under the main argument. Anywho, I'll keep working on that one. As always, any suggestion is greatly appreciated.
So, I believe I'm having an overloading method issue here.
Code:
public static boolean closeAccount (double acctBalance, int checksLeft) { // returns true if acctBalance is less than zero or checksLeft is less than or equal to zero. if (acctBalance < 0 || checksLeft <= 0){ return true;} else{ return false; } } } *public static boolean closeAccount (int acctBalance, int checksLeft) { // returns true if acctBalance is less than zero or checksLeft is less than or equal to zero. if (acctBalance < 0 || checksLeft <= 0 ){ * return true;} else{ * return false; } }
And lastly... how do you launch a browser? I've been searching, and there seems to be no basic answer to this.
Code:
import com.apple.mrj.MRJFileUtils; import java.io.*; public class Main { String url = "http://www.google.com/"; public static void main(String[] args) {new Open(); } Open() { try { MRJFileUtils.openURL(url); } catch (IOException ex) {} } }
Comment