Yeah thanks for all the help!
Type: Posts; User: ZBixby
Yeah thanks for all the help!
Huh.... well I have no idea what I changed but it suddenly started working right, I was going through trying to make sure the {} were right and I might have added one in that made it correct.
I'm honestly not sure what you mean by this.
--- Update ---
I noticed in my assignment details that each of the methods must be separate from the main() method.
Current code is as follows:
//Program Name: Pet Advice
//Author: Zane Bixby
//Date: 09FEB13
//Purpose: To recommend the type of pet a person should own.
import javax.swing.JOptionPane;
Maybe. I think the problem is in my final String command in that I don't know if it needs to be a String command. It won't go by the Switch; Cases commands as it will only return the first case...
Not that I can see other then the already made .class file in my folder from compiling in JGrasp, this has really got me stumped.
These are the results of attempting to run javac -Xlint
C:\Program Files\Java\jdk1.7.0_11\bin>javac -Xlint "C:\Users\Zane\Documents\Peta
dvice.java"
C:\Program Files\Java\jdk1.7.0_11\bin>
Oh sorry the -Xlint command.
The biggest problem I'm having with this code is that it's not wanting to use the Switch Cases is it possible that my String Domicile; and String Hours; commands...
When running it it returned no response in the command line does it output to a file somewhere?
I don't think my javac.exe has -xlint, it keeps returning invalid switch. Agg this is frustrating i'm looking through the code and I can't figure out why the heck the switch;case is returning all the...
Well that partially solved the issue. This code is all sorts of messed up I think because now if I try to return any value other then "A" it gives me my invalid entry error.
Here's the code in...
So I'm trying to change it to the equals() method but I'm receiving errors both ways I tried it. I think I'm a bit lost.
PetAdvice.java:70: error: ')' expected
if (Domicile equals("H");...
I'm using JGrasp to write and compile the program. I thought I had the main() method defined or do I have it set in the wrong spot.
should the main() method be static as opposed to what I have...
I'm currently working on an assignment for my Java class with the following instructions:
Your application will consist of one class, PetAdvice.
Use an input dialog box to request the type of...