2,777 Posted Topics

Member Avatar for newcoder310
Re: Date

What you show for the print out looks like what an object returns to the toStrng() method if it is not overridden in the class. IE it uses the default Object toString() What package is the Date class in?

Member Avatar for NormR1
0
115
Member Avatar for EneilShade

What is the correct sum of primes? What is the difference between what you compute and the correct answer?

Member Avatar for JamesCherrill
0
216
Member Avatar for sane83
Member Avatar for sane83
0
100
Member Avatar for cretaros

What info do you need to get from the user and what data do you want to display back after having done some computations?

Member Avatar for ztini
0
159
Member Avatar for masterofpuppets

[QUOTE]when I try to create the file in my server space, it seems corrupted[/QUOTE] Have you compared the input file to the output file (byte by byte) to see exactly what the differences are? Where do you read/handle binary/non-text data? Your posted code appears to only handle text.

Member Avatar for masterofpuppets
0
225
Member Avatar for aiwasen

Where is the code you are having problems with? Do you have a design for how the program is to work?

Member Avatar for aiwasen
0
166
Member Avatar for BOOMBOOMF

You've posted a lot of code to go thru. If you're just starting with GUI, perhaps it'd be better if you started with a small simple GUI, get that to work and then expand it towards what you need. My approach to using GUI is to present the GUI, let …

Member Avatar for mKorbel
0
359
Member Avatar for himgar

You don't have to set the classpath to the JDK folders. The java command knows where they are. Are you setting the variables in a batch file or in the whole system? Open a commmand prompt and enter: SET Copy and paste the full contents here so we can see …

Member Avatar for rajatarora612
0
197
Member Avatar for Riteman
Member Avatar for marcux

[QUOTE]What comes out in "finalyStore" is not the same as "original".[/QUOTE] Please print the contents of both arrays and post to show us. See the Arrays toString() method for easy display.

Member Avatar for JamesCherrill
0
133
Member Avatar for winecoding

The two of run methods appear to be overloads. They have different parameter lists. I don't know why the author reused the name because run() has a special usage in many classes. Otherwise run is just another method name. You need to read the API doc for each class to …

Member Avatar for NormR1
0
193
Member Avatar for kwins

Good luck on your exam. If you have any specific programming problems, post the code with your questions.

Member Avatar for masijade
-1
206
Member Avatar for StormHawk

[QUOTE]I don't know how to place them a descending order using loops.[/QUOTE] You probably need to look at writing a simple bubble sort. Google this to see how it works. Do you know how to extract all the letters of a String and put them into an array where they …

Member Avatar for JamesCherrill
0
192
Member Avatar for jon.kiparsky

I had this bookmark for it: [url]http://java.sun.com/docs/books/jls/third_edition/html/j3TOC.html[/url] But I see when I try to follow any links that most pages are missing

Member Avatar for jon.kiparsky
0
100
Member Avatar for jtodd

Look at the for loop. The index's max value must be 1 less than the number of elements in the array. For example with 40 elements the max index is 39. Remember its 0 based.

Member Avatar for JamesCherrill
0
2K
Member Avatar for spartanace

Are there any error messages in the browser's java console? BTW The APPLET tag's code= attribute refers to a class not a file. Try removing the .class

Member Avatar for NormR1
0
539
Member Avatar for ajst

Can you make a small simple program that compiles and executes with client and server parts to demonstrate the problem?

Member Avatar for maninaction
0
211
Member Avatar for mutazzaki
Member Avatar for mutazzaki
0
60
Member Avatar for mudi12

[QUOTE]RestrictedAccessException: Group: only a BranchGroup node may be added[/QUOTE] Have you read the API doc for the method you are trying to use? group.addChild(tg); And for the Exception you are getting? The message seems pretty specific.

Member Avatar for mudi12
0
263
Member Avatar for masterofpuppets

Where are all the parts of your application(applets, html, server) and how do they communicate? An applet can connect to the server it was loaded from. Are you trying to connect with another server from your applet? What code do you have on the server to control the chat sessions?

Member Avatar for masterofpuppets
0
290
Member Avatar for stevanity

What is the name of the class you are trying to execute? Your posted code has: class ReverseWord { Your java command: java MyClass Where is the MyClass class file? Does it have the correct main() method?

Member Avatar for stevanity
0
441
Member Avatar for Nirmeen Ased

[QUOTE]when ever i used it an exception occur[/QUOTE] Please copy and paste here the FULL text of any error messages.

Member Avatar for Nirmeen Ased
0
305
Member Avatar for Bubbleboy

Add a MORE statement at the end of the bat file to hold the console open to see if there are any more error message. Also try it with the java command vs javaw

Member Avatar for Bubbleboy
0
3K
Member Avatar for masterofpuppets

Is this product supported by anyone or have a forum for questions? [QUOTE]I might be reading the browser request in a wrong way[/QUOTE] Add a println to the code to show what is read into the line variable.

Member Avatar for masterofpuppets
0
258
Member Avatar for Mr. pen

[QUOTE] it doesn't work [/QUOTE] Are there errors? Please copy and paste the full text of the error message here. Is the output wrong? Please show the current output, explain why it is wrong and show what you want the output to be. Don't expect anyone to download and read …

Member Avatar for Mr. pen
0
186
Member Avatar for arka.sharma

Are you really interested in looking at the pixels of an image one by one and then trying to determine if there is a recognizable shape there? Take a piece of graph paper, draw a shape and go thru it starting at 0,0 to the ending x,y. Record when there …

Member Avatar for JamesCherrill
0
134
Member Avatar for bangor_boy

Read about the break statement and statement labels. Because it is a form of GOTO, a lot of people frown on its use.

Member Avatar for stultuske
0
180
Member Avatar for winecoding

[QUOTE]the eclipse compiler gives me the following message:[/QUOTE] Strange, looks like an execution error. But I don't know your IDE so maybe it is compiler. [QUOTE]java.lang.NoClassDefFoundError: [B]org/slf4j/LoggerFactory[/B][/QUOTE] Where is the class that is referred to in this error message?

Member Avatar for thekashyap
0
204
Member Avatar for vomhaus

[QUOTE]the value(s) are being returned as such - [B][Ljava.lang.String;@6f579a30[/B][/QUOTE] Where do you see the BOLD part shown above? It looks like you are printing the array. I think you want the contents of the array. Try this: [CODE] String[] anArray = new String[] {"asdf", "awer"}; // define 2 dim array …

Member Avatar for NormR1
0
150
Member Avatar for netci

Not sure what you are asking. Are you making copies of the objects the pointers in the ArrayList point to? Or are there only one set of objects with differents sets of pointers to them. The contents of the different arraylists all point to the same objects. Changing them via …

Member Avatar for JamesCherrill
0
202
Member Avatar for stevanity

The main method that the Java command looks for has some args: String[] you left it off your main() definition.

Member Avatar for stevanity
0
243
Member Avatar for jemz

This is a very general question. You'd be better using Google to get some code that you could work on. You probably want to break the project up into several small parts, master the techniques for each and then merge them into the larger program. If you have specific questions …

Member Avatar for NormR1
0
80
Member Avatar for mohamedmo'men

You could use a flag/boolean to remember if you are going up or are going down.

Member Avatar for hfx642
0
87
Member Avatar for ErickN

Can you add some comments to the code explaining its logic. What is the user supposed to enter in the textfield? When I enter: 4+2= and press Enter, "4+2=" is copied to a label below the text field. How is the user supposed to enter his expression?

Member Avatar for NormR1
0
208
Member Avatar for 24x24

TOOOOOO much code to go thru. Can you make a small program that demonstrates the problem you are having and that executes so we can compile and execute it to see the problem and help you find a fix.

Member Avatar for NormR1
0
389
Member Avatar for annetria

[QUOTE] have the rates.txt file in the correct directory[/QUOTE] Are you sure? Your IDE is fussy about where it wants files put. What happens if you take the program outside the IDE and execute it? For resolving this problem, get rid of 95% of this code and work with a …

Member Avatar for annetria
0
136
Member Avatar for bibiki

Try moving the I/O code out of the listener to its own thread. There may be a problem doing too much on Swing's EDT thread. Why don't you add a try{} catch block around the code that throws the exception? You should use an ArrayList to hold the lines, not …

Member Avatar for bibiki
0
146
Member Avatar for student.09

[QUOTE]string, which contains no more than 6 characters, and one digit.[/QUOTE] How would you do this manually? Do it in simple steps. As simple as possible. For example, in a loop you would: Get the next character then do some tests and count Look at the Character class for useful …

Member Avatar for benqus
0
4K
Member Avatar for quinnifir

[QUOTE] it doesent execute the line above the try-catch block[/QUOTE] Why do you think the code is NOT executing that line. What happens if you put printlns both before and after the line? You need to read about the Swing EDT thread. If your code is called on that thread …

Member Avatar for JamesCherrill
0
136
Member Avatar for 9Nimo4

If you wrote your own code you would need to listen to mouse movement and detect a hover. When detected, get the component under the mouse and display a window. Isn't there a tooltip class to do this?

Member Avatar for JamesCherrill
0
542
Member Avatar for collizz

What would the String contain? The pixel RGB values as decimal numbers separated by commas? Seems like a very strange conversion. Like a debug output for looking at the structure of an image.

Member Avatar for NormR1
0
241
Member Avatar for syeda amna

[QUOTE]the program is not responding[/QUOTE] Look at the while loop coding. Check the ending ; What do you want to happen with the loop you have coded? I don't see any comments in the code describing what it is supposed to do. So I can only assume that it is …

Member Avatar for Buffalo101
0
2K
Member Avatar for autorunman22

[QUOTE]to be in one event [/QUOTE] What do you mean by "one event"? Your terms are unusual.

Member Avatar for autorunman22
0
164
Member Avatar for winecoding

Research method overloading. Basically it allows a coder to use the same method name for different but very related cases.

Member Avatar for JamesCherrill
0
147
Member Avatar for AnkitKumar

I start by going to the API doc and read how each of those methods are used. Find the methods by using the INDEX link at the top of the API doc page. Come back if you have any questions.

Member Avatar for AhmedGhazey
-1
70
Member Avatar for arvindikchari

Another way to check a single char. Make it a String and use indexOf with a long String containing all the valid characters.

Member Avatar for AhmedGhazey
0
173
Member Avatar for autorunman22

Your code gets this error: Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at BouncingBall$1.actionPerformed(BouncingBall.java:41) at javax.swing.Timer.fireActionPerformed(Unknown Source) The variable at line 41 is null????

Member Avatar for hfx642
0
206
Member Avatar for tultul

You need a way to change/map your city detail x,y locations as you zoom or position the screen. Perhaps you can find an algorithm by taking paper and pencil and drawing a rectangle for the original view. Find an x,y on that and then zoom in by drawing a new …

Member Avatar for peter_budo
0
134
Member Avatar for joao cruz

[QUOTE]the problem is in the return statement it doesnt receive the afectation of vic inside the for statement![/QUOTE] What is the value of vic that it is not receiving? How do you know what the value of vic is when it is being returned by the method? Is the code …

Member Avatar for joao cruz
0
97
Member Avatar for pxndx

[QUOTE]is says at the end No such element exception [/QUOTE] Please copy and paste here the FULL text of the error message. It has more information about the error than you show. Check your data to be sure there are enough tokens for each nextToken() to get one.

Member Avatar for pxndx
0
236

The End.