Forum: Java 30 Days Ago |
| Replies: 4 Views: 452 The way your totalCost() method is now makes sense except for double finalCost = stickerPrice - (1 - stickerPrice*discount);//why are you subtracting from 1??
If you are going to be multiplying by... |
Forum: Java 30 Days Ago |
| Replies: 4 Views: 452 A lot of commenting is a good thing, its a great habit to have, because it helps others read your code and makes it more organized when you have very large projects, comment away.
final cost is... |
Forum: Java 30 Days Ago |
| Replies: 1 Views: 244 We only give help to those that show effort (http://www.daniweb.com/forums/announcement9-2.html) |
Forum: Java 31 Days Ago |
| Replies: 11 Views: 372 Like I said, instantiating is just creating an object, here (http://java.sun.com/docs/books/tutorial/java/javaOO/objectcreation.html) is the link from the Java tutorials Sun provides. |
Forum: Java 31 Days Ago |
| Replies: 1 Views: 313 Yes you can do this as a console program. An idea would be to have a HashMap, where the key's are each letter from the alphabet, and the corresponding value is the String you want to replace it with.... |
Forum: Java 31 Days Ago |
| Replies: 11 Views: 372 Instantiate, basically, means to create an object. Right now you are trying to call a method, on the object br, yet you haven't created this object yet. Are you taking a class, or learning on your... |
Forum: Java 31 Days Ago |
| Replies: 7 Views: 392 Stupid me for not testing more than once, I was kind of in a rush to get to bed :$
Nice job figuring it out yourself, and thank you for marking this thread as solved. |
Forum: Java 32 Days Ago |
| Replies: 11 Views: 372 You never instantiate an object with the name br. |
Forum: Java 32 Days Ago |
| Replies: 7 Views: 392 What errors? I don't see any in the code. However you do declare DISCOUNT_ONE DISCOUNT_TWO and DISCOUNT_THREE in your main method, which you don't need because they are used in declared in... |
Forum: Java 32 Days Ago |
| Replies: 2 Views: 272 Being familiar with the Java API, available online here (http://java.sun.com/javase/6/docs/api/), is imperative if you plan to program any further in Java. Another fantastic resource is... |
Forum: Java 32 Days Ago |
| Replies: 3 Views: 213 If you are using the printStringArray() in the class it is declared in then it would be printStringArray(reader);. Otherwise you would have to know what class it is declared in, and then create an... |
Forum: Java 33 Days Ago |
| Replies: 11 Views: 372 You can't declare a method inside another method, or a constructor. So you need to move your entire setPoint() out of the Card constructor. |
Forum: Java 33 Days Ago |
| Replies: 4 Views: 565 I think this requires the use of at least one more variable. I would read the integer in as a string, create an array of all it's char's and then compare each one to the digit. |
Forum: Java 33 Days Ago |
| Replies: 11 Views: 372 Sorry I wasn't clear. When I said "it appears you are trying to declare a method within your constructor" I was referring to your illegal start error. |
Forum: Java 33 Days Ago |
| Replies: 3 Views: 213 Do you have to write this method yourself? If not, I'm 99% sure its not part of the standard API. If you just have to use the method some common sense is helpful. Method's are named so that you don't... |
Forum: Java 33 Days Ago |
| Replies: 11 Views: 372 Please wrap your code in code tags, simply highlight your code and click the code button at the top of the reply box. From the unformatted code it appears you are trying to declare a method within... |
Forum: Java 33 Days Ago |
| Replies: 7 Views: 392 Alright, lets go through what you need to output step by step.
You want to output the original price of the item, which works, although I would change public static void calculatePrice(double... |
Forum: Java Oct 26th, 2009 |
| Replies: 10 Views: 566 This forum has no such policy, in fact you can reply to threads from over 5 years ago...if you really wanted too. Thank you for posting the solution to your problem, and for marking the thread as... |
Forum: Java Oct 12th, 2009 |
| Replies: 2 Views: 278 Step 1: Learn Java.
Step 2: Google. |
Forum: Java Oct 11th, 2009 |
| Replies: 10 Views: 566 Not really lol. I never had to integrate them with webpages, I just had to make some for a class once. I'm sure someone else around here will know. |
Forum: Java Oct 10th, 2009 |
| Replies: 10 Views: 566 Read the Java tutorial on applets, here (http://java.sun.com/docs/books/tutorial/deployment/applet/getStarted.html). You are missing a key method every applet needs. |
Forum: Java Oct 10th, 2009 |
| Replies: 12 Views: 370 What are you having a problem with? You told us what your program is supposed to do, and that its not working, but you never told us exactly what part isn't working. |
Forum: Java Sep 23rd, 2009 |
| Replies: 5 Views: 319 The caps are unnecessary, don't use them.
Secondly, there is nothing wrong with the code, it works perfectly, what you have is a logic error. The problem is in your line
System.out.println(a);... |
Forum: Java Sep 22nd, 2009 |
| Replies: 4 Views: 437 Your link doesn't work, you have an extra http://
Here (http://java.sun.com/docs/books/tutorial/uiswing/components/combobox.html) is a working version of your link :) |
Forum: Java Sep 22nd, 2009 |
| Replies: 3 Views: 331 Thank you for using code tags but next time can you try to post just the relevant portion of the code? If we need more we will ask for it. |
Forum: Java Sep 18th, 2009 |
| Replies: 13 Views: 1,869 That is the example for his problem. |
Forum: Java Sep 17th, 2009 |
| Replies: 2 Views: 340 why1991, the output you are seeing is the default toString() method of class Array being called. When using System.out.println() if you put an object in the parameter it will do whatever that... |
Forum: Java Sep 17th, 2009 |
| Replies: 8 Views: 893 That is not true.
Static is used so that a class can call methods on itself without having to create a specific object of that class. Static methods in a class can be called without having to... |
Forum: Java Sep 17th, 2009 |
| Replies: 4 Views: 316 I understand you need help, but if you're such a beginner you don't even know where to start, then the program is too complicated for you make. Start coming up with some designs for the program,... |
Forum: Java Sep 17th, 2009 |
| Replies: 4 Views: 844 Which he would have realized if he goggled it, which is what my link was for. |
Forum: Java Sep 16th, 2009 |
| Replies: 4 Views: 844 Here (http://lmgtfy.com/?q=convert+SIS+to+jar) you go. |
Forum: Java Sep 16th, 2009 |
| Replies: 4 Views: 316 No. Put some effort into the project yourself. We can help you with your program if you get stuck. You will never learn if people do the work for you. |
Forum: Java Sep 16th, 2009 |
| Replies: 3 Views: 242 Don't worry about looking dumb when learning a language. Worry about getting the basics, because they're essential down the road. |
Forum: Java Apr 5th, 2009 |
| Replies: 11 Views: 6,082 Read a thread before posting to it. Your question has already been answered |
Forum: Java Mar 25th, 2009 |
| Replies: 1 Views: 250 Is this really the right forum for this question? Just Google Objective C tutorials and see if they follow the same path Java tutorials take. This is the Java forum, help with Java, not Objective C. |
Forum: Java Mar 22nd, 2009 |
| Replies: 1 Views: 229 Try this (http://lmgtfy.com/?q=Images+in+Java) |
Forum: Java Mar 22nd, 2009 |
| Replies: 19 Views: 870 In addition to what James has said; if you want to be able handle more than one client you will need to create a thread for each client that connects. |
Forum: Java Mar 20th, 2009 |
| Replies: 1 Views: 902 I'm confused what you mean by array keys. You also say you want to print specific elements in an ArrayList, then change and say Array. In any case, with the code you have provided, just change i++ to... |
Forum: Java Mar 20th, 2009 |
| Replies: 3 Views: 305 What error message are you getting? After a quick glance through I think one of the more beneficial things you could do is separate your classes into separate files. You also appear to switch between... |
Forum: Java Mar 20th, 2009 |
| Replies: 3 Views: 938 When I made a chat application I had the same problem. If you had googled a little harder you could have found this solution.
//incoming is the JTextField that displays the conversation
//doc is a... |