2,777 Posted Topics
Re: To get to OS stuff, use JNI to call native code. | |
Re: Have you tried asking this on a database forum? | |
Re: I think tong1 has forgotten how he/she learned programming. You MUST make mistakes to learn. If you copy and paste the brain doesn't get involved enough for the lessons that are needed to sink in. What you see will only be on the surface. | |
Re: Comment on using hardcoded literals in your code for testing keycodes. Why not use the self documenting VK_ symbols Or the literal '3' where you have the 51. Have you tried the consume() method? | |
Re: This looks like javascript. This is a java forum. You'll get better responses on a javascript forum. | |
Re: What is the question? Please post it here so all can read it. | |
Re: Cross posted at [URL="http://www.java-forums.org/java-applets/31125-call-c-exe-java-applet.html#post135205"]http://www.java-forums.org/java-applets/31125-call-c-exe-java-applet.html#post135205[/URL] Which forum do you want your answers on? | |
Re: Do you have a java programming question? | |
Re: Hard to tell without more information. Perhaps there is a bug in your code. | |
Re: Could you explain the logic of the program again using words instead of array references? You're to compare two adjacent index entries in a table for equality. If they are the same then check if the same values for rooms are equal then add ??? something here else if the … | |
Re: [QUOTE]how to do that[/QUOTE] Save the times somewhere and compare them for overlaps. | |
Re: Have you read the Java Tutorial about using JTables? | |
Re: [QUOTE]but still i get errors.[/QUOTE] Please post your errors. | |
Re: Need to see all the code around lines 9 and 13. There is a syntax error before them that is giving the compile problems. | |
Re: [QUOTE]i get an error with this code...[/QUOTE] What is the error? | |
Re: [QUOTE]Code Fragment[/QUOTE] It certainly is. [QUOTE]ways to update my text file existing record[/QUOTE] What do you mean by "update"? Can you explain? [QUOTE]How can I make use of scanner to complete my code[/QUOTE] Scanner methods are for [B]reading[/B] and parsing data. I don't know how you would use it to … | |
Re: YOU might have to use another class like FileFilter for no extension or override the accept() method to add your test. | |
Re: Use StringTokenizer and skip over the first n tokens to get to the ones you want. | |
Re: Wouldn't: return (Vowel.indexOf(ch) > -1); be simpler? | |
Re: There are several steps to putting an app in a jar. A screwup anywhere will cause it to fail. Create a manifest file with the Main-Class: line Be careful of packages and case. Add a Class-path: line for your third party jar compile all the class files into a folder … | |
Re: [QUOTE] display the last object in the array, multiple times.[/QUOTE] It should do it palletLocList.size() times as you have coded in the for loop. It doesn't look in the array at all. It uses the static variable's value for the class. Because you have the variables static, there is only … | |
Re: To go from printing a solid diamond to only the outline, don't print the inside '*'s You need to compute when you're on the inside and output spaces instead of *s Perhaps you could use an if test. | |
Re: Write down on a piece of paper the information that you have. Then use algebra to compute the answer. For example: a car is moving at 20 miles/hour and will travel for 10 hours How far would the car have gone? | |
Re: Sun's has it all: [url]http://download.oracle.com/docs/cd/E17409_01/javase/tutorial/[/url] Otherwise Google. | |
Re: Break the project down into steps. One step is to read in a non negative integer. Write a java program to do that. Compile it and execute it. Come back when you have problems. Post the full text of the error messages and the program. Now look up the formula … | |
Re: Read the API doc for those classes and see what package they are in. Add import statements to your code for those packages. | |
Re: [QUOTE]getting an "illegal character" error [/QUOTE] Please copy and paste error text here. | |
Re: Sounds like a hardware problem not a software problem. Try asking an electrical engineer. | |
Re: Is this the same question as [URL="http://www.daniweb.com/forums/post1287683.html#post1287683"]http://www.daniweb.com/forums/post1287683.html#post1287683[/URL]? | |
Re: What does the method showInputDialog used here return? Does it need to be converted to a String? The code should verify that the data entered was valid. What would your code do if the user entered: "123"? It looks like it ignores the "23" part | |
Re: Find and read the Sun Tutorials about GUI and Swing. Here's the Tutorial: [URL="http://download.oracle.com/docs/cd/E17409_01/javase/tutorial/"]http://download.oracle.com/docs/cd/E17409_01/javase/tutorial/[/URL] | |
Re: Do you have a java programming problem? Please post your code here. | |
Re: Using the Scanner methods can be tricky. Scanner does some buffering of the input and can block for some calls. Your code assumes that there is an int ready to be read. If you used a hasNext method before using the next method, you could be sure the data was … | |
| |
Re: What is the int result you want from the String: "02/14/2010"? If its a Date you need, there are classes for parsing dates. See SimpleDateFormat | |
Re: Scanner methods can be tricky. The Scanner buffers input and can block waiting for input. For example if you enter: A word to the wise <PRESS ENTER> and use next() only A is read, and "word to the wise" is left in the buffer. Your next attempt to get something … | |
Re: [QUOTE] how to call the addProperty method from the Property class[/QUOTE] Can you explain a bit more? The addProperty method is in the Property class. There shouldn't be any problem calling it from the Property class. Can you explain what the app is supposed to do? What is the addProperty() … | |
Re: Java has methods not functions. What java class is the delay() method in? | |
Re: [QUOTE]Is there other method[/QUOTE] Yes, probably hundreds. You method is a bit more than is needed. It could depend on your app's requirements [CODE] String[] input = {"a", "-1", "3"}; for (int i=0; i < input.length; i++) { try{ int val = Integer.parseInt(input[i]); if (val < 1) System.out.println("not positive integer: … | |
Re: [QUOTE]problem to read empty data [/QUOTE] Can you define what "empty data" is? Is the data file in text? Is there a newline character at the end of every line? Would an empty line be one with no data between two newline characters? Your posted example does NOT show where … | |
Re: When I was experimenting with Ubuntu, I found many answers to my questions about how to setup java on Ubuntu on the Ubuntu forum: [URL="http://ubuntuforums.org/index.php"]http://ubuntuforums.org/index.php[/URL] | |
Re: What does Google tell you? OR wikipedia? | |
Re: This works for me: [CODE] File fromFile = new File("FromFolder\\MoveMe.txt"); File toFile = new File("ToFolder\\MoveMe.txt"); System.out.println("renameTo = " + fromFile.renameTo(toFile)); // renameTo = true [/CODE] What else could be wrong? | |
Re: Show us the coding problems you are having. Or write a test program that uses the Scanner class and experiment with its various methods. Or read the API doc | |
Re: Where does the NullPointerException occur? Look at that line in the source and see what variable could be null. Then figure out why that variable is null. | |
Re: YOU need to show the results and explain why its not what you want. celsiusTemp=(fahrenheitTemp-32)*5/9; Common problem here is integer arithmetic. Remember 19/10 = 1 | |
Re: There are classes for writing jar files. See JarOutputStream for example. Try google for sample code. | |
Re: There is a lot more logic in your code than is needed for testing. The following code worked for me. It moved the file from one directory to the other: [CODE]public class MovingFile { public static void main(String[] args) { File fromFile = new File("FromFolder\\MoveMe.txt"); File toFile = new File("ToFolder\\MoveMe.txt"); … | |
Re: What class was not found? |
The End.