- Upvotes Received
- 4
- Posts with Upvotes
- 4
- Upvoting Members
- 4
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
13 Posted Topics
Re: The reason you are getting type resolve issues is because most likely you did not create the Stock class. Here's a pregenerated one you can use from Eclipse: (You'll have to set the parameters yourself.) [code] public class Stock { private int NumberOfShares; private String TickerSymbol; private double Dividend; public … | |
Re: No offense intended, but if you are using Eclipse IDE, it would tell you very explicitly where your errors are and how to fix them. You just had a few minor typos. Here's the fixed code: [code] import javax.swing.JOptionPane; public class Circle { public static void main(String[] args) { String … | |
Re: [QUOTE=ZeroEddy;1675861]Below is my code which I have written in an attempt to create the object/class for a student grade calculator. I am experiencing errors. Am I heading in the right track does anyone know???[/quote] Typically when someone writes an abstract class, the prefix [I][U]get[/U][/I] is what returns something, and the … | |
Re: Typically when I'm coding a GUI or anything - It's a good idea to break it up into different abstract classes. The GUI class should not contain any logic pertaining to connecting and 'parsing' commands -- it should simply contain all the elements of the GUI. You should have a … | |
Re: [QUOTE=JeffGrigg;1673290]So if I understand this properly, you're trying to end up with output that looks something like this: [CODE] Low High Sun 50 70 Mon 55 73 Tue 60 80 Wed 62 84 Thu 58 70 Fri 53 66 Sat 48 50 Avg 55.14 70.43 [/CODE] To do that, I'd … | |
Re: You can literally implement something like that in any language, the problem is if you have no idea where to start - it's going to take you a long time. I guess the first step would be learning to write java crypto programs; using a cipher to encode and decode … | |
Re: Scanner uses " " (space character) as a delimiter for strings by default. So, the value3 - value will always be "chocolate" even if your user types "chocolate chip". [B]Solution:[/B] Change all scan.next(); statements to scan.nextLine(); [CODE] import java.util.Scanner; public class Cookies { public static void main(String[] args) { System.out.println("Why, … | |
Re: [code] BufferedReader reader = new BufferedReader(new FileReader(strPath)); String line; while ((line = reader.readLine()) != null) { System.out.println(line + "\n"); } [/code] | |
Re: Well, one thing is for sure - you're going to need to use a try-catch clause inside a conditional while-loop for error checking purposes. I also wouldn't worry about initializing all those integers for different inputs. Just break your program up into different methods and only worry about the current … | |
Re: I'd start here: [url]http://lobobrowser.org/java-browser.jsp[/url] an open source, fully API-extendable java browser. | |
Re: the user variable needs to be an instantiated variable under the class, and either needs to be given a value there or in a default constructor. Infact it shouldn't even compile because I don't see where user is ever instantiated (Including jTextField2 as well). I'll assume all the variables are … | |
Re: Well for starters, it's a common misconception that a line like [code]string += "new stuff";[/code] Is innocent when thinking about efficiency - however it is extremely inefficient because Strings are considered final objects at runtime in java. What java actually does with this line is instantiate a temp object called … | |
Re: Hi. I think if you're serious about learning java on your own -- and from what you say you have a pretty good understanding of programming in general already; I would pick up 'Java - The Complete Reference.' It's like 20 bucks and it's a good thing to keep on … |
The End.