318 Posted Topics
Re: You don't really need a lot of the things you have here. I have modified what you have there slightly, take a look and see if you understand everything. [CODE]import java.util.Scanner; class noob{ private static int highest,lowest,a,b,c; public static void main(String[] args) { noob nb = new noob(); // You … | |
Re: The thing is, without all the 'boring' stuff, you will have no chance of understanding anything more advanced. Best advice I can give is, Just stick with going through books/tutorials and try to complete some basic projects that test the skills you have already learned. Trying to do too much … | |
![]() | Re: Hi, If you thoroughly read this, the answers may come more easily! [url]http://www.daniweb.com/forums/faq.php?faq=daniweb_policies[/url] |
Re: Post what code you have and we can help you determine where you are going wrong | |
Re: Without looking through all your code, have you set the frame visible on the panel? | |
Re: Missed the whole bottom of your post :D | |
Re: You could try creating a new class and transfer the main method over to that, then extend Applet and create an instance of your Timer class, not sure if this will give a lot of bugs though. | |
Re: [CODE] String str = "AAA BBB CCC"; String strReplaced = str.replaceAll(" ",""); System.out.println(strReplaced);[/CODE] you need 2 strings to do that, one that contains the string you want to replace, and then one to hold the end product | |
Re: try adding a float:left; to the main content rule failing that, try to wrap an additional div around the floated sidebar, apply the float to the wrapper and remove the float on the interior div,. IE has big problems rendering floats.(IE6 anyway) | |
Hey, I have a problem and am hoping that you can help me find a solution. I have a site created in dreamweaver. To do this, I made a template, with 2 editable regions, then set up all my pages. The problem I am having, is that I am trying … | |
Re: so you have calculated the average? Now all you need is to print it, so just pass in an int/double | |
Re: Where do you specify the suits? Or am I going blind in these early hours edit: ah I see, 0-3 | |
Re: Are you talking about the JDK bin directory?? Nothing should really be in a bin directory. Set up a small directory with index.html and a separate folder called applet. then: [CODE]<applet code = "applet/TestApplet.class"></applet[/CODE] Or just have both files in the same place | |
Can somebody be so kind as to tell me if 'freelance' websites are legit? I have never heard of them before today and I'm looking to make a bit of money on the side. If they are legitimate would you please drop a link to some decent sites? Thanks for … | |
Re: If you have problems like this, best thing to do is avoid them! I can't tell from your post but having proper indentation is a life saver when you have an error such as yours, especially if you are working with a lot of code. | |
Hey, I have a problem. I am unsure as to what image type I should export from fireworks for use in dreamweaver. I am sure I have tried almost everything but whatever I do, the transparency refuses to work in dreamweaver, which of course messes up the whole look of … | |
Re: One of the main reasons for seeking help in public forums is so you can share your problem and then also the solution that arises. Removing everything is not a very smart thing to do | |
Re: Here, I have a ready made batch file for you, it works 100%! <URL SNIPPED> | |
Re: What is it you are trying to accomplish? | |
Re: Word of advice. Instead of trying to find ways [B]around[/B] problems that occur, Try to find the reason/root of the errors. Apart from the obvious error of everything underneath the main method floating in space, Why do you have 5 closing braces at the bottom of your code? You only … | |
Re: [QUOTE=hello2;1357827]one third divided by three fiths equal two forths[/QUOTE] [B]Aug 8th, 2009 Is my homework Correct :P[/B] Please [B]READ[/B] the original posts date before reviving old threads!!! | |
Re: [url]http://www.daniweb.com/forums/thread317845.html[/url] I guess you must have a classmate who also needs help with the same things. I suggest you set up an IM conversation with him so you can both work on the problem together! It is the best way to learn! p.s. If you hadn't realised I am being … | |
Re: Wow, can you people not read the date of the post? Dec 1st, 2004 was when the thread was last active! Don't bump old threads randomly!! | |
Re: What error are you getting? There is nothing wrong with the code you posted, the best way to debug is to show us all of the code because the problems are usually in a different place. | |
Re: Is it just a simple console game you are making? If so, I would start off with a base class called Pieces. With all the different pieces inheriting from that class. Use polymorphism to return an identifier for each piece. e.g. 'p' for pawn. You will also want a mainGame … | |
Re: You need 3 stacks, so therefore why not have 3 variables to mimic these stacks. Each variable needs to contain a random number between 3 and 10. There are many examples of how to generate random numbers. Use these examples. Think of a way to check which players turn it … | |
Re: You need parentheses to enclose your constructor. i.e. [CODE]public Triangle(int x1, int y1, int x2, int y2, int x3, int y3) { a = x1, y1; b = x2, y2; c = x3, y3; }[/CODE] | |
Re: Well, without you pasting the exact errors, its hard to see small mistakes. But in your printBuyPotionMenu() method, you declare a couple of variables of type char. Then you decide to set that char to an int. char is an integral type that usually contains members of the execution character … | |
Re: Where do you tell it [B]not[/B] to output everything? | |
Re: Good news! It is possible to do this! | |
Re: [QUOTE=burcin erek;1343129]pls try [CODE]#include "stdio.h" #include "conio.h" int ay,yil,gun,a,y,g,guns,ays,yils; main() { a=9; // todays month // g=27; // todays day y=2010; // todays year printf("enter the day ");scanf("%d",&gun); printf("enter the month:");scanf("%d",&ay); printf("enter the year:");scanf("%d",&yil); if(gun>g) { g=g+30; a=a-1; guns=g-gun; } else guns=g-gun; if(ay>a) { a=a+12; y=y-1;a ays=a-ay; } else ays=a-ay; … | |
Re: Like JamesCherril said, you have no parentheses on your default contrsuctor. Also, [CODE]public void double adjust() {[/CODE] Can't be void and double at the same time. Void means the method takes no arguments | |
Re: [url]http://download.oracle.com/javase/1.4.2/docs/api/java/util/Date.html[/url] | |
Re: Sure we can help you! Just paste whatever code you have written so far so we can attempt to help you. | |
Re: Card games are usually the games of choice for first time developers. Now I don't mean a card game with a gui, just a simple text game. 21's/blackjack is quite an easy start. You should first think about which classes you will need. ![]() | |
Re: [CODE]public static void main(String[] args) { String inputInvest; String yearsInvest; double rate = 0.8; double investment; int years; int yearsloop = 1; double balance; {// this is your problem [/CODE] | |
Re: [QUOTE=tong1;1342938](1)You have to assign the following variables an initial value, such as 0 for init or 0.0 for double in lines 10,11, and 12: double withholding= 0.0; double netPay= 0.0; int withholding1= 0; to pass the compiling. (2) You have to delete the pair of curly brackets at the line … | |
Re: Whats the problem? Do you have errors? Which part do you need help with? Logic or language? | |
Re: Uhm, Do you know you have 2 main methods? | |
Re: [CODE]while (answer = 'Y')//should be == {[/CODE] Why is this here? [CODE]while (answer = 'Y') { cout<< "Please enter your guess " << endl; cin>>guess; cout<<endl; [B]break;[/B]//why do you have this here?[/CODE] [CODE]if (guess = dice){//This is not correct. You need ==[/CODE] You have no input from the user if … | |
Re: SergeantJoKer is correct, You only use quotes when printing strings. What you have there, will print vo+v1 to the console. It will [B]not[/B] print the calculation. Remove the "" from the calculation and it will print the answer. As a matter of fact, you should really initialise another variable to … | |
| |
Re: Why do you want to return 0? What is it you are trying to make your program do? | |
Re: [url]http://www.cplusplus.com/forum/articles/2231/[/url] [url]http://www.cplusplus.com/doc/tutorial/functions2/[/url]//scroll near to the bottom | |
Re: Where is your code? The math.pow() function is simple to use. It accepts 2 arguments: math.pow(double a,double b)...where [B]a[/B] is the base number and [B]b[/B] is the exponent. So, for example, to write 3 squared in java, you use the math.pow() method as follows: [CODE]Math.pow( 3.0 , 2.0 );//returns 9 … ![]() | |
Re: What do you mean? Can you post some code to try and illustrate what you mean? | |
Re: Show us what you have so far so we can help you. | |
Re: Simple fix to your problem of it printing the end result in 2 lines. Inside each if statement, just print the whole line. Although, for me, it prints exactly as you wanted it to print using your code. |
The End.