1,963 Posted Topics

Member Avatar for shreeswetha

Use proper English and search the Yahoo to find your answer. We are not going to open our books for you and start typing the entire explanation. That is something you can do without our help.

Member Avatar for javaAddict
-2
51
Member Avatar for sirlink99

You have a problem with your brackets. After removing some of the code inside the ifs and the whiles, you have something like this: [CODE] while () { } else if () { } [/CODE] Which is wrong. Try from the start and this time try to open-close, and then …

Member Avatar for sirlink99
0
328
Member Avatar for bonafos

In case you haven't noticed [I]masijade[/I], this is the second time this poster made that question: [url]http://www.daniweb.com/forums/thread317619.html[/url] In that post he received the appropriate answer. Apparently he didn't like it so decided to double post. Same on you bonafos. No one here is going to give you the code. Show …

Member Avatar for javaAddict
-1
74
Member Avatar for bonafos

And? How should we help you? What kind of help do you need? Can't do a little search on your own to find the tutorials that you need? At the top of this forum you will plenty tutorials about java, not NetBeans. NetBeans is an IDE, you need to learn …

Member Avatar for javaAddict
0
37
Member Avatar for CodeBoy101

I don't know if this the case, but you MUST first call: [ICODE]rs.next()[/ICODE] to get the row from the ResultSet. Meaning that when you do: [ICODE]String Instructor = rst.getString("Instructor");[/ICODE] you probably get an exception, go inside catch, and nothing is displayed: Also about this: [CODE] if (Instructor == null) Sorry, …

Member Avatar for atikahuk
0
178
Member Avatar for jenzelcarmel

Do you have a data structure with all the jobs and their times: shortest start, shortest finish, longest start, longest finish? (I don't know the English terminology) I don't see where you save those values. Have an array for example with the jobs and their times. Then create a new …

Member Avatar for javaAddict
0
2K
Member Avatar for meghab

Can't you put variables in the values of your url? How do you create that url and how did you put in your code?

Member Avatar for meghab
0
113
Member Avatar for aravind rao

But if those files already exist, you can look at the [URL="http://download.oracle.com/javase/1.4.2/docs/api/java/io/File.html"]java.io.File[/URL] API. There you will find what you need. Always look the API.

Member Avatar for javaAddict
0
93
Member Avatar for Jobie111

That is because you never call the reduce. It needs to be put in the constructor so no matter what the user enters your variables will have the right values. [CODE] public Fraction(int numerator, int denominator) throws Exception { top = numerator; bottom = denominator; if (bottom == 0); throw …

Member Avatar for javaAddict
0
113
Member Avatar for bonafos

30X30=900 It is a simple multiplication. If it is for finals, then how is it possible that you don't know how to declare 2 int variables, multiply them and assign the result to a third int variable and then print it? Or even how to read from the input. Search …

Member Avatar for javaAddict
0
322
Member Avatar for nikita.chandra

Post your code. There are various way to do that. If you say that you have javascript that executes then post your code.

Member Avatar for nikita.chandra
0
215
Member Avatar for Radio2006

Just declare the classes with the methods described. Then in the first class have your main method and call the other methods. Study how you create classes, declare methods and call them. You will also need the help of the java API: [URL="http://download.oracle.com/javase/1.4.2/docs/api/java/lang/String.html"]java.lang.String[/URL] For the second class: [CODE] public class …

Member Avatar for Radio2006
0
247
Member Avatar for hell_tej

[QUOTE=Hari Murthy;1355001]Is it not possible to Stretch the image JLabel! or it is possible , if yes plz post the code for me..........[/QUOTE] I haven't tried it but here is a suggestion, you can use. The JLabel constructor takes as argument an Icon. Actually you call it with argument an …

Member Avatar for javaAddict
0
5K
Member Avatar for jalpesh_007

No one is going to give you the code. Java is similar to C. If you wrote this code, do some studying and you will have no problem converting yourself. If you have any problems post you JAVA code. If you didn't write it no one is going to help …

Member Avatar for javaAddict
-3
218
Member Avatar for judgemental

[QUOTE=judgemental;1352596]Norm 1 RUN THE CODE!! then YOU WILL SEE THE PROB.[/QUOTE] No need to shout. The problem has already been spotted. No need to run the program. Norm1 has told you what the problem is. Read his post. Not to mention that the error message says the same thing, which …

Member Avatar for javaAddict
0
462
Member Avatar for sergiolio

This assignment doesn't look like something you assign to a student that has been doing java for a few weeks. So I must assume that your teacher has told you everything you need to know in order to solve this. If you have never studied during the entire course that …

Member Avatar for javaAddict
0
145
Member Avatar for subrat_p

What you ask consist of many technologies. A small example is not going to be enough and none here is going to spend time writing code that has already been written many times in this forum. Where are you having problems with? Displaying the combo boxes, firing the "change" event, …

Member Avatar for subrat_p
0
1K
Member Avatar for churva_churva

In this link: [URL="http://www.daniweb.com/forums/thread310512.html"]http://www.daniweb.com/forums/thread310512.html[/URL] you asked the same thing. You got the answer for the question you posted here and said you understood it and then asked other questions. After all of my suggestions which you claimed you figured them out and have fixed your code, now you post the …

Member Avatar for javaAddict
0
423
Member Avatar for MikNoz

You can convert the int to a String. It will be easier then. Check the String class API. [CODE] int i = 123; String s = String.valueOf(i); // now s="123" // then use the String methods char [] ch = s.toCharArray(); [/CODE] You can loop the array backwards and generate …

Member Avatar for NormR1
0
107
Member Avatar for Yutxz

[CODE] for (int i = 1; i == 60; i = i +1) { [/CODE] The loop executes as long the condition: i==60 is true. If it is false the loop exits. So you begin with i=1. Then the condition is checked: i==60 which is false, so the loop exits …

Member Avatar for javaAddict
0
1K
Member Avatar for Sunshineserene

There aren't such problems. Be more descriptive on what you are trying to accomplish

Member Avatar for javaAddict
0
348
Member Avatar for javaAddict

Hi, here is the question: I have 2 textfields in my JSP: [CODE] <s:textfield name=" ...." /> <s:textfield name=" ...." /> [/CODE] Now I went to browser and did: View Source Code, and noticed that around the above tags, there were auto-generated tags that put the above fields into 2 …

Member Avatar for garaki
0
1K
Member Avatar for dorotalp91

For starters notice that the input will determine the number of lines. So use the input as upper limit to a for loop. Then each line has that many number as the number of line. First line: 1 number Second line: 2 numbers .... This will tell you the upper …

Member Avatar for cazio_)15
0
146
Member Avatar for niketh90

What kind of code did you find that didn't work. just have a method where you open the connection and call the query. There are codes for that. Whether it is Applet or not it is irrelevant. Create that method based on the examples you found and then call it …

Member Avatar for niketh90
0
90
Member Avatar for smith345

So far the code seems ok. Just add the 'void' keyword at the withdraw method and add a get method that returns the balance. Then create a main method and instantiate the classes: CurrentAccount and/or SavingsAccount and call their methods and print the balance.

Member Avatar for javaAddict
0
1K
Member Avatar for osirion666

[QUOTE=KoOSKdotnet;1340126]I appreciate that this is an old thread but why on earth would you post a reply still with errors and with a pointless fix!. First of all you are using a reserved word in your SQL statement "from" cannot be used as a parameter as its reserved by SQL. …

Member Avatar for javaAddict
0
456
Member Avatar for azrasiddiqui

[QUOTE=azrasiddiqui;1341723]i want code for my project on Online Voting System in Java[/QUOTE] Then write it. Don't expect anyone here to give you the code. Especially when the project is that big. You expect that someone else will spend all that time to write tons of pages of code? Post your …

Member Avatar for javaAddict
-3
55
Member Avatar for ceyezumma

Exception in thread "AWT-EventQueue-0" [B][COLOR="Red"]java.lang.IndexOutOfBoundsException[/COLOR][/B]: Index: 8, Tab count: 2 tlaa get vu.getResource: tabCount: 11 at javax.swing.JTabbedPane.checkIndex(JTabbedPane.java:1736) at javax.swing.JTabbedPane.setSelectedIndex(JTabbedPane.java:572) [B][COLOR="Red"]at view.menus.innerframe.admin.JMenuControlAdmin.controlJMenuItems(JMenuControlAdmin.java:53)[/COLOR][/B] That says it all. Read the error messages that you get. Don't just throw them to other people. At that line you are trying to set a too large …

Member Avatar for ceyesuma
0
283
Member Avatar for bryans2010

Can you re-post your code in code tags? Just click the (code) button when making a new post and put your code in there. Also give more explanations about your problem

Member Avatar for NormR1
0
195
Member Avatar for madhu ms

First of all you don't initialize the Statement object. You have your connection and then you call the execute, but you didn't create the st. Also everything you are doing is wrong. And don't tell me that it is correct because it executes. Don't open connection or run queries in …

Member Avatar for javaAddict
0
3K
Member Avatar for mishra pradeep

Here is the code: [CODE] <html> <head> <title>This is a title</title> </head> <body> Hello Nurse </body> </html> [/CODE] Given the thousands of internet sites out there can you understand how unintelligent your question is? If you have been to told to build a site for an assignment come up with …

Member Avatar for javaAddict
0
88
Member Avatar for alex8206

[CODE] <a href="page.jsp?id=5">Text</a> [/CODE] Or for a dynamic link jsp: [CODE] <a href="page.jsp?id=<%=id%>">Text</a> [/CODE] Where 'id' is a java variable

Member Avatar for alex8206
0
1K
Member Avatar for sonu33

Without even looking at the code since it is not in code tags - Press the button (Code) and put your code inside the tags that will appear - I took a look at the error: java.lang.NullPointerException ServletOne.doPost(ServletOne.java:46) ServletOne.doGet(ServletOne.java:15) Try to read them from the begining. As soon as you …

Member Avatar for sonu33
0
3K
Member Avatar for rasputinj

[QUOTE=letsae;783841]could you please help me with a java code for connecting a client and a server?[/QUOTE] Jesus [I]letsae[/I]! Haven't read [I]verruckt24[/I]'s post. Don't you know how to create a new thread? This is a dead thread not a make-a-wish well

Member Avatar for abcd1220
0
2K
Member Avatar for kennski23

Then write a 2D array of size 20x20. Have variables to save the position of the turtle and its current direction. When the user enters an input, use if statements to determine the position that it needs to move. If it is a valid position within the limits of the …

Member Avatar for peter_budo
0
328
Member Avatar for kumpul101

Read the input from the keyboard by using the Scanner class. Search for examples. As for the rest you need to provide some more information. For example, will you have to enter each character after the other or you will need to enter one word and then take that word …

Member Avatar for kumpul101
0
191
Member Avatar for churva_churva

In the constructor you are initializing locally a new String. You need to initialize the one declared globally as a class attribute. The [ICODE]String emplo [];[/ICODE] declared at the beginning of your class. In the code when adding elements you add an element when the array is full which is …

Member Avatar for javaAddict
0
269
Member Avatar for nix_xin

Read the input. Convert it to a String. Loop the String using its charAt(int) method to take each digit as a character. Convert that to an int and add it to the sum.

Member Avatar for nix_xin
0
321
Member Avatar for neo_31591
Re: JDBC

I would suggest to save in a table, the question, the options and the correct answer as columns. Then query the table into an ArrayList for example and randomly select an element. Use Math.random()*list.size() Were exactly are you having problems?

Member Avatar for nohup
0
120
Member Avatar for nitin_gyan
Member Avatar for NewOrder

No it is not inside it. What is done you call FindPiece. You can call it from wherever you want. So you are calling it from inside the method. You can call methods inside other methods: [CODE] public void p1() { } public void p2() { } public void p3() …

Member Avatar for NewOrder
0
94
Member Avatar for seanooi
Member Avatar for smoothe19

[QUOTE=Sir Saula;1329003]it's a copy and pasted question people..[/QUOTE] That doesn't mean anything. Post your code with specific questions. Open a book and follow the examples.

Member Avatar for javaAddict
-3
343
Member Avatar for nikita.chandra

The session is one. That is what it does. If you had set the attributes to the request then you would be able to access them only from one page to the other. But if you put them to the session, you can access them from any page, no matter …

Member Avatar for nikita.chandra
0
161
Member Avatar for nikita.chandra

Add a Double object as attribute and when you get it, cast it to Double. Look at the java API for the class: java.lang.Double. It's a class like any other. Don't let its name confuse you. It's a class with methods and attributes.

Member Avatar for javaAddict
0
80
Member Avatar for patilsunil47

If it is database, read some tutorials about it and post some code. Search for database connectivity with java

Member Avatar for javaAddict
0
70
Member Avatar for nikita.chandra

After you have run the query, use the ResultSet and a while loop to save the results in a Vector. Then you can do whatever you want with the Vector at your servlet or jsp. I suggest you study first how to run queries and get the results with java, …

Member Avatar for ~s.o.s~
0
82
Member Avatar for madhub2v

What do you mean: "should never rewrite total content." And what would be the format of your file. Meaning what would its content be? What are the rest of your requirements?

Member Avatar for masijade
0
116
Member Avatar for Pushpasheela

Try to empty the second combo box before adding any more dates from the first combo.

Member Avatar for javaAddict
0
210
Member Avatar for rebellion346

What are those 1 and 5? [ICODE] Function[n][0] < 1 || Function [n][0] > 5 [/ICODE] They are suppose to by dynamic. The user is the one that enters those values. 1 nad 5 have no meaning. Why any function must be between those ranges? Couldn't it be this function: …

Member Avatar for javaAddict
0
237

The End.