1,963 Posted Topics
Re: Use [URL="http://java.sun.com/javase/6/docs/api/java/util/Vector.html"]java.util.Vector[/URL] or [URL="http://java.sun.com/javase/6/docs/api/java/util/ArrayList.html"]java.util.ArrayList[/URL] | |
Re: Use a for loop that takes the values of the arrays and do this: sum = sum + a[i]*b[i]; | |
Re: illegal start of expression if (artistText.getText[B](.[/B]equals("")) { if (artistText.getText().equals("")) { C:\Documents and Settings\Tammy\My Documents\NetBeansProjects\Stock\src\stock\StockGui.java:374: ')' expected int MESSAGE(); [B]What are you trying to do here? Declare an int or call MESSAGE()[/B] C:\Documents and Settings\Tammy\My Documents\NetBeansProjects\Stock\src\stock\StockGui.java:446: not a statement temp == (FeeQtyProduct)stockInput.getFeeQtyProduct(index); [B]Try with 1 '=' the above is used to … | |
Re: What do you mean capture? | |
Re: Actually you need the argument as input in the method. [CODE] public class Grades { public static void main(String[]args) { Instructor grades = new Instructor(); char grade = args[0].charAt(0); grades.congratulateStudent( grade ); } } [/CODE] Of you will need to check if the user has given an argument: [CODE] if … | |
Re: Then I will assist you by giving you this advice: You'd better get started because you've got only 17 days to complete this assignment. What; you thought that we were going to do this for you? Not in this forum. If you trully need assisance, start coding and we will … | |
Re: As you can see for each line, you have a start, then increase each element by 1 and when you reach 5, if you didn't insert 5 elements in the line start reducing. 5 4 3 2 1([B]start[/B]) 4 5([B]reached 5, will decrease until the line is filled[/B]) 4 3 … | |
Re: You will need a database, if you are doing a more advanced course. If you need to store the data somewhere, so the next time you run the application you will have them back. then you could use a database. But if you want to keep thinks simple, you could … | |
Re: Should the capacity of the cartons be measured in Volume (liters) rather than mass (kg)? We will not do this project for you, but we will help with YOUR code and give you hints. Let me read carefully the specifications and let me see what I can do. In the … | |
Re: You can put the System.out.println() inside the while-loop: [CODE] while (more) { try { System.out.print("Please enter the file name: "); String input = console.next(); FileReader reader = new FileReader(input); Scanner in = new Scanner(reader); counter.read(in); } catch (FileNotFoundException exception) { more = false; System.out.println("Characters: " + counter.getCharacterCount()); System.out.println("Words: " + … | |
Re: If you run by hand both for-loops, you will see that the x,y take value from 0 to [B]5[/B]. They go: 0, 1, 2, 3, 4, 5. You correctly insert data in the arrays. When the index reaches value 5, then this statement is false: ( y=0; [B]y<Arr2.length[/B]; y++ ), … | |
| |
Re: What kind of information are you looking for in the CD Rom? | |
Re: [QUOTE=perezfl;637022]Hello all, for (int i = 0; i < count; i++) System.out.print(studentScores[i] + " "); // Declare and initialize output JOptionPane.showMessageDialog(null, "Student Name: " + studentName, "\nScores: " + studentScores[i] + " ", "\nAverage: " + average, "\nHigh Score: " + studentHighScore, "\nLetter Grade: " + studentLetter); } }[/QUOTE] The … | |
Re: You get the error because process1 is null. At the if you check if it is null or not, but regardless the result you call this `process1.getCurrentNode();` anyway. The idea is to call it only when it is not null. So if this is true if (process1==null) { then what … | |
Re: You are calling the method wrong. The compiler tells you EXACTLY what is the problem. If you can't figure out such a simple message, what are you doing with GUIs and not learning the basics of java? proj.java:101: showDialog(java.awt.Component,java.lang.String,[B]java.awt.Color[/B]) in javax.swing.JColorChooser cannot be applied to (javax.swing.JPanel,java.lang.String,j[B]avax.swing.JColorChooser[/B]) As you can see … | |
Re: I started in 1998. 6 months: Fortran 77 in unix 6 months: Pascal 6 months: Ansi C And at 2003 I started java and I've being doing it ever since | |
Re: Hi , I am also interesting in buying a book for VB .NET. I know good java and need a book for my assignment at university. The assignment will include databases and web. Is [B]Sams Teach Yourself Database Programmng with VB .NET in 21 Days[/B] any good? | |
Hi All, I am an experienced java programmer for many years. But my problem is that the final assignment that was given to me for my master at the university, has to be written in VB .NET. Do you know any good books for learning VB .NET for someone like … | |
Re: I think: [CODE] MySubType mytype = null; //instead of MySuperType mytype = null; if (sub_type) { mytype = new MySubType (); mytype.setD(4); mytype.setE(5); } else { mytype = new MySuperType (); } mytype.setA(1); mytype.setB(2); mytype.setC(3); [/CODE] MySuperType mytype = new MySubType (); No because superType is not a subType. Super … | |
Re: Download from the site of sun the java sdk [URL="http://www.sun.com/download/index.jsp"]http://www.sun.com/download/index.jsp[/URL] | |
Re: First of all no one understood what do you want and what you are trying to accomplish. Some might have an idea what do you mean but your questions are too general. Please rephrase. [QUOTE]how to retrive the text file from database using jsp[/QUOTE] You cannot use jsp to retrieve … | |
Re: Have you tried to run any other java programs (that don't use connecton to DB) successfully? Try to do this: Right-click on the project, Properties, Add jar, and add the derby.jar Have you tried to go to Services tab and connect to the database of your choice? | |
Re: Video class: you need to add the findVideo method. The argument as specified by the .pdf file as well as whta it needs to do. Just create a for-loop that compares all the videos in the array or the ArrayList with the other video given. you declare a noOfHires vatraible … | |
Re: First of all don't use the same name for the ArrayList and the argument of addAdvice(). It is bad programming. Second, does this thing compile? I think that the getAdvice (int index) will have a problem: [CODE] public String getAdvice (int index) { // This is a stub. It returns … | |
Re: I think that KeyPressed is triggered exactly when you press the key. Meaning that you don't have to release the key (lift you finger from the key) to be activated. As for the KeyTyped I think that is activated you release the key, although I am not sure. You can … | |
Re: [CODE] vac=(4*va*vc); vbc=(2*vb*vb); .... raiz = Math.sqrt(vbc-vac); [/CODE] The correct formula is b*b - 4*a*c. You write: vbc-vac = [B]2[/B]*vb*vb - 4*va*vc | |
Re: [QUOTE=warrior16;623896]Interesting. To check the array that is made of Strings, you just go if(wordlist[1] = "whatever the name is") Thats how you check the array of Strings you made. Your code is very complicated. char array[]=wordList[0].toCharArray(); What does that above line mean? Your creating an Array called array and it … | |
Re: I think that this shouldn't even compile: [CODE] Date date; date = (rcd.getDate(1)==null?"":rcd.getDate(1)); [/CODE] Because if rcd.getDate(1)==null then the expression wil return an empty String: "". But date is type Date: Plus, I think that the parenthesis should be like this: [COLOR="Red"]date[/COLOR] = (rcd.getDate(1)==null)?[COLOR="Red"]""[/COLOR]:rcd.getDate(1); | |
Re: [QUOTE=sasidharnet;621757]Hello, this is sasidhar. I am going to attend an Inteview. He gave me a simple project using servlets. Inventory management. I am searching for procedure in net. If anyone gives Some useful information regarding this I am very thankful. If I submit this project almost I will get job. … | |
Re: What is the sql type of the column in your database? Perhaps you can alter the query in order to format the column and return it as String: select TO_CHAR(date_col,'DD/MM/YYYY HH24 : MI : SS') from table tbl; The date_col would be type DATE at the table and when you … | |
Re: What errors and what code did you use to connect to the db? Is the applet displaying correctly? Try to remove the code that connects to the database and see if the applet displays correctly. Have you tested separately in a main method if you connect and read from the … | |
Re: Hi Irene and welcome to DaniWeb. As you can see from the picture I am also a fan of animes (Ghost In the Shell ROCKS!). I also love Warcraft and Starcraft. What programming language do you usually write? By the way, try to post questions in relevant threads. This is … | |
Re: I don't know if it is relevant but in what order have you added the C:\j2sdk1.4.2_12 at the environment variables? Perhaps you need to put first the latest version because once it finds the 1.3.1_01 it doesn't "search" for the rest in the environment variables. If someone thinks I am … | |
Re: My JApplet skills are a little rusty. But this is what I would suggest. Have you tried to run a single applet as an example that just displays a message in the browser? Take an example from a tutorial and see if it is displayed correctly. Then remove what you … | |
Re: [CODE] public ClockCanvas(String c,String tz) { city = c; calendar = new GregorianCalendar(TimeZone.getTimeZone(tz)); Timer t = new Timer(1000,this.target); t.start(); setSize(125,125); } [/CODE] I believe that in the above code the target: this.target is null; Your NullPointerException: target.timeElapsed(this); was because target was null. I have search from where it takes value … | |
Re: First of all this is a java forum. Java and javascript are entirely different. If the users in the array are not sorted then you are right on how to do it. | |
Re: I have noticed that you don't close anything and that your file doesn't have extension: [CODE] String filename = "grade" + myFormat.format(today); [/CODE] Shouldn't be like: [CODE] String filename = "grade" + myFormat.format(today) + ".txt"; [/CODE] I don't know if the above will solve your problem but try to add … | |
I will briefly explain my problem: I have a while-loop and inside I call some methods. Inside one of the methods I have this error: java.lang.[B]NoClassDefFoundError[/B], which is been caught and the while continues. The problem is that a few seconds later as the while keeps running the same method … | |
Re: Read a HTML tutorial: This is what I prefer: [URL="http://www.w3schools.com/"]w3schools[/URL] And you are at the wrong forum. I think there is a forum for JSPs | |
Re: There is an expression: [CODE] someVariable = (boolean)?value1:value2 [/CODE] Which is used in the code you showed. If boolean is true then the someVariable will take as value the value1 If boolean is false then the someVariable will take as value the value2 Now compare those two expressions in both … | |
Re: I think that the problem is that it does not find the update_issue.jsp page. Probably has something to do with where is the folder where you have you placed the update_issue.jsp file. I think that you need to specify the path at the link. You should ask the same question … | |
Re: Check the API and see if the add method is static or not: ArrayList.add(person); Perhaps it should be al.add(person); | |
Re: [QUOTE=EngSara;610461]hello .... I need a java code that convert from eqn ( or bench ) format to verilog format.... Does anyone has an idea?! Thanks in advance....[/QUOTE] What is eqn, bench and verilog format? | |
Re: From this output: Linedata: java.lang.ArrayIndexOutOfBoundsException: 1 I believe that one of the lines is empty. As you can see nothing is printed after the "Linedata:". So probably you are doing split("#") to an empty line. Therefor the table will have size 0 or 1 (I don't know exactly), but the … | |
Re: It is obvious that you need to count the brackets. I don't know how you usually write code, but do not open anything without closing it first. You need to open an if () { } ? First write this: [CODE] if () { } [/CODE] And then go and … | |
Re: Even if you create your own Exception you will still need to implement some sort of validation in order to decide whether to throw the exception or not. So it up to you to decide, once you have made the validation, if it is necessary to throw an Exception or … | |
Re: The compiler tells you exactly where the errors are. Can't you read the messages and go at the lines the message indicates to fix it? [QUOTE] C:\Users\sars\Desktop>javac indata.java indata.java:11: class, interface, or enum expected Public class indata { ^ [/QUOTE] As you can see the arrow pints at the 'P'. … |
The End.