2,777 Posted Topics

Member Avatar for miraj0072004

Can you post a complete program that compiles and executes that demonstrates the problem? It would be useful if you included your comments in the code describing your problem instead of having the comments in one place and the code in another.

Member Avatar for NormR1
0
101
Member Avatar for dbanks4271

Can you show what the program does now and explain what the problem is? How would you do it if you did it manually? Would you subtract the amount for the quarters when looking for the dimes?

Member Avatar for Katana24
0
138
Member Avatar for NewOrder

Is the console variable null? Read the API doc for the System console() method. Can that method return null? I don't know why your IDE doesn't support the console method.

Member Avatar for JamesCherrill
0
200
Member Avatar for TheSecOrg
Member Avatar for TheSecOrg

[QUOTE] it's on line 12 (if (one == 1){) [/QUOTE] What is the "it's"? Do you get an error message? Please copy and paste the full text of the error message here. The equality test: one == 1 doesn't make sense. The variable 'one' can't be compared to an int …

Member Avatar for TheSecOrg
0
200
Member Avatar for ChPravin

[QUOTE]I want the loops to stop executing as soon as the function is called recursively.[/QUOTE] Try breaking out of the loops immediately after the recursive call is made.

Member Avatar for jon.kiparsky
0
1K
Member Avatar for extemer

[QUOTE]i want value assign to form1 in the start method to call in main not calling the ful method[/QUOTE] Sorry, I'm not able to understand what you want. Can you explain it further please? Do you want the start() method to return the value of form1 to its caller?

Member Avatar for coil
0
103
Member Avatar for alex1986

If you try to compile your code you will get a list of error messages that you should post here. The messages contain information that explains what and where the error is. Please copy and paste here the full text of your error messages.

Member Avatar for alex1986
0
181
Member Avatar for ozlem.a17

Can you post all of the code before line 44 back to the start of the method the line 44 is in? Is the variable i defined?

Member Avatar for JamesCherrill
0
116
Member Avatar for kimiko

Please use the correct code taga for you code. See the icon above text field to right. What are your questions or problems? If there are errors, please copy and paste here the full text of the error messages.

Member Avatar for jon.kiparsky
0
245
Member Avatar for dpirtle83

Please copy and paste here the full text of the error messages so we can see exactly what the error is. If you are on Windows: To copy the contents of the command prompt window: Click on Icon in upper left corner Select Edit Select 'Select All' - The selection …

Member Avatar for NormR1
0
158
Member Avatar for Iamthecheese

Please use code tags when entering your code. Use the icon above to right. [QUOTE]what I'm doing wrong[/QUOTE] If there are errors, please copy the full text and paste it here. Is the program generating the correct output? Your posted output has no comments showing if or where there is …

Member Avatar for NormR1
0
200
Member Avatar for ivan3510

What language are you programming in? This is a forum for the java programming language.

Member Avatar for ivan3510
0
109
Member Avatar for NewOrder

[QUOTE]how do i import pieces [?][?] array in class chessInterface to a pieces class (Bishop in this example..)[/QUOTE] Pass a reference to the array to a method: Bishop bshp = ... bshp.checkMove(pieces); What is in the pieces array? Its dim is 7x7 pieces=new ChessPiece[7][7] but you access the 8th position: …

Member Avatar for NormR1
0
200
Member Avatar for mukulnimker

[QUOTE] shos error tha it cnnot find symbol[/QUOTE] Please copy and paste full text of the error message here. What is the classpath set to when you compile the program? It must point to the folder containing the package folder.

Member Avatar for sidhu2204083
0
214
Member Avatar for LianaN

[QUOTE]my code doesn't work correctly:[/QUOTE] Can you describe what isn't correct about what you've posted? To debug your code add a [CODE]System.out.println("e=" + e); // Show event contents[/CODE] to the listeners and click/double-click the component and look at what is printed out.

Member Avatar for LianaN
0
203
Member Avatar for fuser

How long does it take if you manually ping an address? The timeout is (1+3) seconds, so (255*4)/60 = 16+ minutes Add some debugging code to printout the System currentTimeMillis to see how long each "ping" takes.

Member Avatar for fuser
0
133
Member Avatar for kandyhyatt
Re: help

[QUOTE]What am i doing wrong ??[/QUOTE] If there are errors, please copy the full text and paste them here.

Member Avatar for Katana24
0
195
Member Avatar for TheComputerGuy

Test that the length of the args that it has enough elements before trying to use any of its elements.

Member Avatar for NormR1
0
108
Member Avatar for hazeeel

[QUOTE] I can't seem to get the output[/QUOTE] Can you explain what happens? Try printing out the values of coordinates1[a].length and coordinates1[b].length to see what is happening in the code.

Member Avatar for hazeeel
0
267
Member Avatar for Andrew Davis 64

[CODE] int g3 = g1 + g2;[/CODE] What is this statement supposed to do? What are the values of g1 and g2?

Member Avatar for coil
0
303
Member Avatar for NewOrder

Comment on your board size: pieces =new ChessPiece[7][7]; Most boards I've played on have 8 rows and 8 columns. if(x==chessPiece) { The == operator checks if the two references point to the same object. It does NOT look at the contents of the objects. To do that you must use …

Member Avatar for NewOrder
0
191
Member Avatar for Xufyan
Member Avatar for NormR1
0
131
Member Avatar for ubi_ct83

To keep your two dimensional indexing scheme You could have an arraylist that contains arraylists. Dimension one would be into the outer arraylist. A get() there would return the inner arraylist. Dimension two would be into that arraylist.

Member Avatar for jon.kiparsky
0
112
Member Avatar for daudiam

Do you have the layout of a movie file and know where in the file the data you want is located? Given that we can help you read the file and extract the data.

Member Avatar for daudiam
0
117
Member Avatar for thilinam

[QUOTE]Some parts of application do not work[/QUOTE] Are there any error messages displayed on the console? Open a command prompt, change to the folder with the jar file and enter; java -jar YOUJARFILENAME.jar If there are error messages you don't understand, copy and paste them here.

Member Avatar for NormR1
0
77
Member Avatar for fat0ali0ma

How can we help you write your program without any code from you or questions from you about the program you are trying to write?

Member Avatar for fat0ali0ma
0
182
Member Avatar for PeDz08
Member Avatar for glenak

Do all the catch blocks do prints of some kind? Do you run the server with a console window that will be open when the server stops that could show any error messages?

Member Avatar for glenak
0
185
Member Avatar for phouse512

Please explain what your problem is. Copy and paste the full text of the error messages here.

Member Avatar for phouse512
0
77
Member Avatar for ozlem.a17

[QUOTE]faced with a nullpointerexception,[/QUOTE] please copy and paste here the full text of the error message. It has useful info to solve your problem.

Member Avatar for NormR1
0
142
Member Avatar for yap_1991

[QUOTE]my codes can only read one file instead of all files in my directory.[/QUOTE] Try debugging your code by printing out a list of all the files found in the directory: System.out.println("All files=" + Arrays.toString(fileDir)); // show all files found and then show each one as it is being processed: …

Member Avatar for NormR1
0
134
Member Avatar for Gregoriochavez
Member Avatar for Gregoriochavez
0
79
Member Avatar for CALGACUS

An approach: Create a two dim array of String with the first array defined by the size of the Arraylist. Iterate thru the array list and set each second dim of the String array to next element of the ArrayList

Member Avatar for NormR1
0
161
Member Avatar for Xufyan

The return statement only returns the value of one variable. The prototype for a method only specifies one type to be returned by the method. Hence there is no way to return the values of more than one variable in one statement. You either need to redesign the logic of …

Member Avatar for Xufyan
0
205
Member Avatar for sonamsinha23
Member Avatar for dresposure

Another definition; Swing is a set of classes for building GUI. Swing GUI classes can be used in applets or applications. JApplet is the Swing version of the Applet class. Applet is special class that browsers can work with to have a GUI on a web page. The GUI can …

Member Avatar for extemer
0
162
Member Avatar for erogol

What part of the project do you want to code? The part that actually makes the sound is mostly contained in packages and classes. The GUI to control what is played would be as a Swing application. I downloaded a sample sound Development Kit years ago, but can't find it …

Member Avatar for erogol
0
144
Member Avatar for SaranyaKrishnan

Why ask a question about problems in another language/environment on a java forum?

Member Avatar for SaranyaKrishnan
0
176
Member Avatar for churva_churva

[QUOTE]how to make a menu into this program switch style[/QUOTE] Not sure what you are asking as the solution is so simple: Use println() for each line that you want printed: System.out.println("MENU"); System.out.println("[1]=ACCEPT;"); etc for the rest of the list

Member Avatar for NormR1
0
324
Member Avatar for extemer

What is the error message in the browser's java console? If you have any questions about it, please copy and paste the full text here.

Member Avatar for NormR1
0
136
Member Avatar for Sunshineserene

I start by making a small program that only reads the data into an array and then prints out the contents of the array. For printing the array see the Arrays.toString() method. The Scanner class can be easy to use to read in lines of data. Then use the String …

Member Avatar for NormR1
0
485
Member Avatar for skyzer

[QUOTE]how to appoint to my spaceship speed, direction etc. I mean before i click launch button,[/QUOTE] I assume those properties values are held in variables. Can you 'appoint'/set their values in the constructor for the spaceship object? Your scattered comments and pieces of code are hard to follow. This seems …

Member Avatar for skyzer
0
233
Member Avatar for boiishuvo

[QUOTE] it didn't work. Any suggestions?[/QUOTE] Copy and paste here the full text of any error messages you get. If no errors, describe what the program does and why that is NOT WORKING. [QUOTE]What is the method of Graphics that allow you to draw within the program? [/QUOTE] There are …

Member Avatar for tong1
0
151
Member Avatar for lanhlung696
Member Avatar for cac186

2). Skip might work IF all the records are [B]exactly the same length[/B]. Try it and see what happens.

Member Avatar for NormR1
0
191
Member Avatar for glenak

To debug your code add a println() to show the value before you try to parse it. println("pin=" + pin + "<") // show pin's value [QUOTE]a number format error[/QUOTE] Can you post the full text of the error message here?

Member Avatar for NormR1
0
130
Member Avatar for djbhoco

Can you show the output you now have, describe what is wrong with it and show what you'd like it to be?

Member Avatar for coil
0
484
Member Avatar for glenak

You could search all the drives. Use the File class's listRoots() method to get a list of root Files. In a more structured environment, you could use environment variables to point the external drives or memory sticks. Set them on the new computer and your code can find the stuff …

Member Avatar for glenak
0
63
Member Avatar for tennis

[QUOTE] will the 2 and true overwrite the 2 and false or they both exist in the Hashtable? thanks[/QUOTE] Can you write a simple program to test what happens? Then you'll know if and how it works. Let us know what happens.

Member Avatar for NormR1
0
87

The End.