1,963 Posted Topics

Member Avatar for shobha1335

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]

Member Avatar for javaAddict
0
158
Member Avatar for arLe20

Use a for loop that takes the values of the arrays and do this: sum = sum + a[i]*b[i];

Member Avatar for javaAddict
0
128
Member Avatar for javagreenhorn

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 …

Member Avatar for javaAddict
0
192
Member Avatar for viber101
Member Avatar for Khakimonk

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 …

Member Avatar for Khakimonk
0
108
Member Avatar for roshantheman

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 …

Member Avatar for javaAddict
0
102
Member Avatar for esy928

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 …

Member Avatar for javaAddict
0
121
Member Avatar for Aamit

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 …

Member Avatar for javaAddict
0
73
Member Avatar for rriiddaa

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 …

Member Avatar for javaAddict
0
163
Member Avatar for LevelSix

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: " + …

Member Avatar for LevelSix
0
480
Member Avatar for TofiLuk

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++ ), …

Member Avatar for ~s.o.s~
0
143
Member Avatar for prof_satch
Member Avatar for bhavnaagrawal
Member Avatar for nuwan243
Member Avatar for Ezzaral
0
106
Member Avatar for perezfl

[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 …

Member Avatar for Ezzaral
0
114
Member Avatar for amjad277

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 …

Member Avatar for amjad277
0
99
Member Avatar for shwetha_cs26

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 …

Member Avatar for javaAddict
0
109
Member Avatar for lAmoebal

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

Member Avatar for stephen84s
0
362
Member Avatar for Duki

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?

Member Avatar for jbennet
0
139
Member Avatar for javaAddict

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 …

Member Avatar for jwenting
0
149
Member Avatar for new_2_java

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 …

Member Avatar for new_2_java
0
144
Member Avatar for Wickedself

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]

Member Avatar for griefers
0
156
Member Avatar for ramakanth

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 …

Member Avatar for javaAddict
0
86
Member Avatar for yap

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?

Member Avatar for peter_budo
0
177
Member Avatar for kosilence

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 …

Member Avatar for javaAddict
0
100
Member Avatar for sktr4life

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 …

Member Avatar for sktr4life
-1
182
Member Avatar for parthiban

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 …

Member Avatar for javaAddict
0
428
Member Avatar for ajithraj
Member Avatar for cocotugo

[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

Member Avatar for cocotugo
0
95
Member Avatar for Futbol10

[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 …

Member Avatar for Futbol10
0
115
Member Avatar for k_en

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);

Member Avatar for jwenting
0
105
Member Avatar for sasidharnet

[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. …

Member Avatar for javaAddict
0
279
Member Avatar for k_en

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 …

Member Avatar for masijade
0
170
Member Avatar for dipankar.

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 …

Member Avatar for jwenting
0
96
Member Avatar for 184218_Irene

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 …

Member Avatar for selfhelpebooks
0
139
Member Avatar for shobha1335

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 …

Member Avatar for peter_budo
0
79
Member Avatar for funtoosh

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 …

Member Avatar for Ezzaral
0
178
Member Avatar for funtoosh

[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 …

Member Avatar for funtoosh
0
226
Member Avatar for ramp12

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.

Member Avatar for javaAddict
0
97
Member Avatar for NycNessyness

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 …

Member Avatar for NycNessyness
0
158
Member Avatar for javaAddict

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 …

0
82
Member Avatar for luxmi_gee
Re: jsp

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

Member Avatar for guymanbuddude
0
123
Member Avatar for Relegant

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 …

Member Avatar for javaAddict
0
85
Member Avatar for shobha1335

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 …

Member Avatar for shobha1335
0
139
Member Avatar for roadrage75

Check the API and see if the add method is static or not: ArrayList.add(person); Perhaps it should be al.add(person);

Member Avatar for javaAddict
0
155
Member Avatar for EngSara

[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?

Member Avatar for masijade
0
140
Member Avatar for programmer321

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 …

Member Avatar for javaAddict
0
195
Member Avatar for kimbostun

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 …

Member Avatar for javaAddict
0
218
Member Avatar for hezfast2

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 …

Member Avatar for hezfast2
0
108
Member Avatar for D boss

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'. …

Member Avatar for javaAddict
0
118

The End.