- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 8
- Posts with Upvotes
- 7
- Upvoting Members
- 8
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
47 Posted Topics
Re: There are a couple of things you can check for this problem: 1. Is your browser set to "Enable Java" ? (Go to Tools > Options > Content Panel 2. Ensure that your applet file (class file) have the appropriate file-access permission and the browser should be able to read … | |
Re: Take a look at the documentation for the String class in the API [url]http://java.sun.com/j2se/1.5.0/docs/api/[/url] | |
Re: Object is the superclass of all objects in JAVA which includes your Person class. Person therefore inherits attributes and methods from Object. you can override the method equals(Object obj) of the Object class in your Person class by having equals(Person inPerson) because Person is also type of Object. confused much? … | |
Re: 1. client class/interface does not exist 2. client class/interface does exist BUT with an uppercase "C" | |
Re: There are a lot of options you can choose from: Connections: 1. using an ethernet cable 2. using RS-232 3. USB ? I suggest using an ethernet cable. its very easy to set-up a network and write a communications program in java (ie., using sockets, other network protocols etc). In … | |
Re: [QUOTE=beshoyatef;1014370]i do this : " download my code from this : [URL="http://www.4shared.com/file/140858938/8cf47f25/_2__MovePawn.html"]http://www.4shared.com/file/140858938/8cf47f25/_2__MovePawn.html[/URL] I try but i can't . please illustrate your answer with code thanks[/QUOTE] show us what you tried and we'll work from there. follow what peter_budo have suggested. | |
Re: try this in yout printInputList() method : [CODE]for (int i=0; i < inputList.size(); i++) { if(inputList.get(i).equals(new Integer(44))) dataOutput += ","; else dataOutput += inputList.get(i); } }[/CODE] the would simply compare the input values to 44 (which is the character encoding for the comma) and append a comma to the output … | |
Re: [QUOTE=BhagatS;1016681]Indeed there must be the problem in using System.out.println instead of System.out.print in the inner loop.[/QUOTE] WHAT?? | |
Re: use the normal FileWriter class. read the java api for more information on how to do this . [url]http://java.sun.com/javase/6/docs/api/[/url] | |
Re: try setting your button to a certain width and scale the imageIcons by using getScaledInstance() method of the Image class. | |
Re: [QUOTE=Foxh451;1013197] b) if you really want average to be rounded to an int, type cast the right side of the equals. "int average = (int) sum/TOTAL_NUMBERS;" so what you should really have looks like this: [CODE]for(int i = 0; i < numbers.length; i++) { sum += numbers[i]; } float average … | |
Re: start by reading the tutorials in the sun java website. there are simple examples that you can look into as well on that website. google is your friend! | |
Re: No you haven't posted the code right. The last code tag should have a forward slash like this: (/CODE) For your problem, In your ActionListener you are passing a Stack object to the JLabel setText() method when it was expecting a String. Instead of using this: resultLabel.setText(stack); YOu should have … | |
Re: read the java api , specifically on the String class and String operations. all the answers are in there. Also take a read on the tutorials in Sun Java website regarding Strings [url]http://java.sun.com/docs/books/tutorial/java/data/manipstrings.html[/url] | |
Re: you will not learn until you try it yourself. read some tutorials about threads and applets then start coding your own. If you get stuck at some point or if you need some clarifications then thats when you ask people here at the forum. | |
Re: one way you can do it is to have methods which determines min, max and ave. and everytime the user inputs a number it calls this methods. 1. for the min/max if its the first run obviously any number from the user is the starting value. then for succeeding inputs, … | |
Re: yes there is! firstly, you need to know how the data is stored in the file (ie., structure, data types etc). Then you can read the file through a java program and do your data analysis. | |
Re: Keep in mind that each node in a LinkedList contains a "NEXT" pointer, which points to the next node and/or a "previous" pointer which points to the previous node. You may set-up a Node class which contains the element of that node and the pointers: [CODE=JAVA] public class Node{ Node … | |
Re: The question is..do you know how to program in JAVA? (you haven't mention it in your "skill levels") | |
Re: 1. you did not include an actiontionListener() to your Calculate button. You should have: [CODE]jbtCalculate.addActionListener(this);[/CODE] 2. same as above you need to add an actionListener to the "clear" button. then you could make a method which clears all the selection and reset the total cost by using setSelected(false) methods of … | |
Re: [QUOTE=akulkarni;1009418]i couldnt start the server...i tried using commands in dos like.."tomcat start".The url i used was [url]http://localhost:8080/[/url][/QUOTE] An easier way to start and stop tomcat is using the Tomcat Monitor. I think during the installation of tomcat it asks you if you would like to install that monitor . However … | |
Re: if you are limited to using the premitive type of int as an array then you can do it this way: 1. loop through the array 2. if 0 is found then "shuffle" the preceeding elements by replacing the "0" element with the next element (if not zero). 3. count … | |
Re: Try Robocode! It's a fun way to practice your programming skills (in JAVA) it's addicting and you can even join competitions to battle against the robots develop by other users. [url]http://robocode.sourceforge.net[/url] I have been implementing a learning algorithm with my robots :) | |
Re: [QUOTE=salamjamal10;1012388]ok then whats wrong with my while statement[/QUOTE] Do not put a semi-colon at the end of your while statement. | |
Re: it's called regular expressions (java.util.regex) take a look in here: [url]http://java.sun.com/docs/books/tutorial/essential/regex/[/url] | |
Re: please enclose you code inside the CODE tags so its easier to read. | |
Re: you can start by reading java books or online java tutorials on how to make a program | |
Re: looking at your code... did you copy and paste that? if yes then, you need to ensure that "public" and "private" modifiers are in lowercase. | |
Re: first convert the string to char array and display the elements of that array backwards. There is a method in the String class which converts that string into char array. | |
Re: [QUOTE=miasuhyla;1012470]Write a class called Person.java that has instance variables matric number, name, date of birth, and gender. Use appropriate data types for these instance variables. Include constructor and set and get methods for all instance variables. Draw UML diagram for class Person. Then, create an application class that asks the … | |
Re: I'd say Master of Information Science. Library = boring Information = interesting i'm really being subjective here ;) | |
Re: It should be AND (&&) statements right instead of OR? | |
Re: Firstly, the start of the CODE block in posting your code here should be without '/' to display the formatted code correctly. The way you set-up your Printwriter is without automatic flushing. You need to use flush() method after you write something into the file. Have a look on the … | |
Re: [QUOTE=didi00;1011088]Thanks. One more question: Should I create ODBC entry for the data base this way: Open the Administrative Tools icon in your Control Panel. Double-click on the Data Sources (ODBC) icon inside. Choose the System DSN tab. Click on Add in the System DSN tab. Select the Microsoft Access Driver. … | |
Re: Java Sun's documentation is always a good start to look for an answer. [url]http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html[/url] | |
Re: this is what I've understand on this problem: printing the first k values of the function meaning if k is 1, you output one value of y using x=1. The validating part is where you substitute k to x (x=1) . In your example given above if k is 4 … | |
Re: you are getting that error because in your constructor part you specified that an Exception is thrown therefor any calls to that exception must handle that thrown Exception. To solve that problem surround your code with a try - catch clause [CODE] try{ c1 = new CircleObj(inputx,inputy,inputradius); }catch(Exception ex){ //put … | |
Re: I always use the static methods of the String Object. [CODE]String number = String.valueOf(n);[/CODE] You can also use that for various other primitive types like int, long, char, double etc. | |
Re: [CODE] try { BufferedReader read= new BufferedReader(new FileReader (new File("fileToRead.txt"))); Scanner fileReader = new Scanner(read); while(fileReader.hasNext()){ System.out.println(fileReader.nextLine(); } fileReader.close(); }catch (FileNotFoundException fileNotFound) { } catch (IOException ioEx){} [/CODE] | |
Re: How do i solve this error? "The import.javax.mail cannot be resolved" | |
| |
Re: Indeed! 2 more games and the tournament is over. im hoping we could get more players next time. How i wish i could face narue in the finals. i know quintoncoert is a good player. nonetheless, ill give you a good game, buddy. Even it takes hours to finished it. … | |
Hi everyone, I used to play counter-strike on my laptop before and it works perfectly. and it has been ages since i have uninstalled it. Now i want to play it again and try to install a new copy and when i play it, the screen goes wild it sort … | |
Hi all, I have a java applet which i embed on a webpage and i got an error of.. "Applet CatchingBubbles.class notinited" what seems to be the problem? spent hours to fix it but i couldn't...any reply would be appreciated. thanks by the way CatchingBubbles.class is the applet. |
The End.