2,777 Posted Topics
Re: [QUOTE]but the processes launch an exception.[/QUOTE] What was the exception? | |
Re: Can you show what your current design ideas are? And explain what your problem is coding that design in java. | |
Re: Where is EasyIn defined? Is it a class that is in a jar file that you need to include on the javac program's classpath? Where did you find EasyIn? Is there any doc there about it? | |
Re: Make a list of the functionality you want to give your class. Make a list of the methods you'll need and the data structures to support the data in the set. Do a little design work and start coding. | |
Re: [QUOTE]doesn't work.[/QUOTE] Please explain what happens. If there are error messages in the browser's java console, copy them and paste here. | |
Re: What layout manager are you using? Can you post a small program that compiles and executes and shows the problem. | |
Re: You want to add an "s" if the number of units is > 1? Look at the tertiary operator. It is a quick way to do something like that in a single statement String lbl = "hour" + ((hours > 1) ? "s" : ""); ![]() | |
Re: Check that all the {s have a matching }. If your editor does not have a tool for matching finding the matching {}s, print the listing and use a pencil to manually pair them. Your unformatted code makes it very hard to see matching {}s. If you use code tags … | |
Re: Use the concept of two arrays in parallel. One is the String of '-' the other is the String of characters for the word. Given a char input by the user, search the word for a match, if found, replace the '-' at the same position in the String of … ![]() | |
Re: [QUOTE]but I can only remove 1 value (the first one found).[/QUOTE] Please explain and show what the problem is. In removing items from a list it's better to start at the end of the list and move forward. That keeps the front of the list unchanged as you move into … | |
Re: Please explain your problem. Show input and output and add comments showing what the problem is and what the output should be. | |
Re: [QUOTE]Can't do str.contains because it allows almost anything to match anything else.[/QUOTE] Please explain and post the code showing your problem. If the order is not important, you could use a Set. Add all the Strings to it and at the end only the unique ones will be there, duplicate … | |
Re: [QUOTE]How could I allow the user to specify a word and then have the program check if that word is on the game board.[/QUOTE] How/where are the words on the game board stored? Given a String containing the word, you would search the location where the game board words are … | |
Re: You forgot to post the full text of the error messages. | |
Re: Is this a browser usage problem? Does it work the same way with different browsers? | |
Re: What are the restrictions on the code that can be written to solve this? | |
Re: [QUOTE]I am trying to access a varible value from a return fuction in another class.[/QUOTE] What code are you talking about? You need to give the name of the class, the name of the method and indicate with easy to see comments where you are calling the method. | |
Re: The print statement should not change the value of a variable. Can you explain exactly what you see when you execute the code with the print statement and when you execute the code without the print statement. Where do you show the value that is returned by the getLowestInRow() method? ![]() | |
Re: There is no better tool than a compiler for working with source code. | |
Re: Your bits and pieces of program code are hard to piece together to make a complete program. Can you write a small simple program that compiles and executes and shows your problem? The small squares you see look like you are reading binary data (like int or double) and treating … ![]() | |
Re: Create the full command as a String before calling the exec method and print it out so you can see if it is correct. | |
Re: Your code works for me. It prints one line with all the file's lines in it. Can you copy the console for when you execute the program and paste it here? | |
Re: Do you have any specific questions or problems? If so please ask them. If you are getting errors, please copy and paste the full text of the messages here. | |
Re: If you are using the readLine() method be sure to send an endline character. The readLine method waits until it has read all of a line before returning. | |
![]() | Re: Here's how to copy from the command prompt console: To copy the contents of the command prompt window: Click on Icon in upper left corner Select Edit Select 'Select All' - The selection will show Click in upper left again Select Edit and click 'Copy' Paste here. ![]() |
Re: See the Desktop or Runtime and Process classes for ways to call OS programs from a java program. | |
Re: Can you explain your problem? You very short pieces of code don't say much. | |
Re: [QUOTE]how to read in a file of integers and build a tree using them[/QUOTE] Start with the reading the file of integers. When you can read them into a variable, add logic to add them to the tree. Then read the other file and test each number is in the … | |
Re: If you had three pieces of paper with the names written on them and four slots on the table where you could lay the pieces of paper, 3 holding the papers with the names and one empty, How would you move the pieces of paper one at a time from … | |
Re: The Runtime and Process classes can be used to call external/OS commands. | |
Re: Can you post the code do you have for the program with your questions or the full text of the error messages you are having problems with. When you post code, please use code tags. See the (code) icon above the input box. | |
Re: Have you looked at Mouse Listeners? Are you able to change a JFrame's position on the screen? | |
Re: Define what you mean by a Web site? Are you talking about an HTML page that loads in a browser? Non applet java programs runs on a PC by using the java command. | |
Re: Or pass the name of the file in the args to the main method, then continue as above. | |
Re: Where is the receive "function" or do you mean method? Where is the infinite loop that the code enters? The only loops I see are ones that you have coded as infinite loops: while(true). If you don't want those loop to be infinite, provide a way for them to end. | |
Re: Your error message sounds like a mismatched pair of {}s. Look at the lines before the line number of the first error message. | |
Re: [QUOTE]part of my code that decides what to keep seems to be making a mistake[/QUOTE] Have you tried debugging your code? If you do not have an interactive debugger, add lots of printlns to your code to show the values of variables as they change and are used and to … | |
Re: Must have been some recognizable data in what was on the clipboard. | |
Re: Cross posted at [url]http://www.java-forums.org/java-applets/51137-two-random-numbers.html[/url] | |
Re: [QUOTE]struggling on creating a unique account id for each customer[/QUOTE] What are the rules for defining an account id? For example: first 3 letters of last name, year of birth, 6 digit,incrementing id number that starts at 1. | |
| |
Re: Did I post some code for this problem earlier somewhere? You need to use a String to generate the key. Look at what the classes in this code does: [CODE] // Create the key KeySpec keySpec = new PBEKeySpec(passPhrase.toCharArray(), iv, iterationCount); SecretKey key = SecretKeyFactory.getInstance(ALG).generateSecret(keySpec); [/CODE] | |
Re: [QUOTE] how to get the different letters from an inputted word to output as a number.[/QUOTE] Do you have an algorithm for converting the letters to a number? Can you give some examples? | |
Re: [QUOTE]NoClassDefFoundError: com/sun/xml/stream/buffer/XMLStreamBuffer[/QUOTE] Where is the missing class? Is there a missing jar file? Is the jar file with that class on the classpath? | |
Re: Do you have the format for the contents of a .rar file? Given that you should be able to extract its contents. | |
Re: @jazz_vill Why do you do the OPs homework instead of trying to help him learn to do it himself? You don't learn much copying and pasting. If you are going to post code, you should add enough comments to the code to describe your logic and what the code does … | |
Re: [QUOTE]I don't know how to return the new arrays with the prefix.[/QUOTE] Please explain your problem. Do you really need all this code for coding a return statement? | |
Re: See cross post at: [url]http://forums.devshed.com/java-help-9/homework-working-on-a-simple-banking-program-866261.html[/url] | |
Re: What happens when you execute the program? | |
Re: Do you have a design for the program? A list of things it needs to do. What items have you completed and tested and now having working? What items on the list remain to be done? |
The End.