1,963 Posted Topics

Member Avatar for ryathegr8

Then use a separate String variable. In the for loop concatenate all the elements of the array into that String variable and then display that variable. Initialize it outside the for loop. Give it value in the for loop. Then after the loop display it. [CODE] strArray += array[k] + …

Member Avatar for javaAddict
0
123
Member Avatar for prem2

Maybe you should convert the char that you get to an int. Convert this: '2' to the int 2. Instead when you do this: [CODE]int i = '1';[/CODE] You are not setting the int 1 but the ASCII value of the character '1' which is something else. Try something like …

Member Avatar for kdmuk10
0
520
Member Avatar for Priya123M

From what I see you have your select tags inside a for loop? That would mean that the html generated will have more than one <select> tag. If you use the request.getParameter, it will always return the first value. But you send at the request many <select> "items" with name …

Member Avatar for javaAddict
0
4K
Member Avatar for paul ince

At errors you get it says this: [B]at JFrameDemo.main(JFrameDemo.java:8)[/B] What does it say at the line 8 of the file JFrameDemo.java. Something there is null

Member Avatar for Stefano Mtangoo
0
952
Member Avatar for Victor C.

You have 2 for loops one inside the other. And if you omit the code inside them you get something like this: [CODE] for (count=0;count<11;count++) { for (count=0;count<frequency.length;count++) { } } [/CODE] You are using the same variable to access two entire different arrays. And the fact that they might …

Member Avatar for NormR1
0
176
Member Avatar for imag1ne

In the WordCheck constructor you have it backwards. You are suppose to set the value of the class attribute wordsUsed. Instead you change the argument and the wordsUsed attribute of the WordCheck never takes value and it is null. Also what is the purpose of the condition method ? It …

Member Avatar for Taywin
0
148
Member Avatar for seemant gupta

[QUOTE=seemant gupta;793886]is there any book from which i can learn net beans[/QUOTE] Try the tutorials of the net beans site. And net beans is an IDE that helps you organize your projects. Shouldn't you been learning java?

Member Avatar for theprogrammer19
0
127
Member Avatar for DoEds

It should be && instead of || And why do you use the + It is not necessary. Also you don't need this: [CODE](uInput1 > uInput2 || uInput1 > uInput3)? +uInput1: +uInput2[/CODE] If the uInput1 is not the max, then why do you assume that the uInput2 is the max? …

Member Avatar for DoEds
0
126
Member Avatar for ryathegr8

You can call the Integer.parseInt(String) method and if it throws an exception then it is not an int.

Member Avatar for javaAddict
0
85
Member Avatar for sunil_skmd

[QUOTE=braggy58;1276678]i badly need this before july 21,[/QUOTE] Start a new post, use code tags, and give more explanations. What is wrong with your code? What is your question?

Member Avatar for javaAddict
0
213
Member Avatar for balaji153

[QUOTE=balaji153;1275414]i am php developer , do i need java knowledge before learning jsp , if yes why so?[/QUOTE] Yes, you do need java, because JSPs are basically html code with java inside. You need to know calling methods, creating custom classes, creating instances of those classes. You cannot just start …

Member Avatar for javaAddict
0
134
Member Avatar for Mastersrebel
Member Avatar for djenoe

properties is an array. It doesn't have these methods: printPropertyDetails, addProperty. For printing loop the array and take each Property object from the array and print that. As for adding you need to do what you do at the beginning of your program. You have the count variable. So add …

Member Avatar for NormR1
0
146
Member Avatar for anuj_sharma

You need to find a way to read the excel file. Once you do that, then it is easy. Call methods that save values to the database and pass as arguments the values read from the excel. You will need 2 different things. Write methods that write to the database. …

Member Avatar for kumar pushkar
0
113
Member Avatar for divya bangroo

[QUOTE=shrekting;1274376]I post reply for those persons whose pc could dispaly chinese and who can understand chinese ,not u who can only code in english! u r not internet men,but me! byebye daniweb.com![/QUOTE] And what if someone has a problem and expects an answer. Does he have to know Chinese to …

Member Avatar for steph47
0
111
Member Avatar for kanjali

IF you know C# then you will have little difficulty converting it to java on your own. It will not take you much time to read a few things about java. If you know C# you don't need to learn anything new, just understand a few things about how java …

Member Avatar for masijade
0
311
Member Avatar for Zetlin

The error is very clear: [B]symbol : variable lengh[/B] from the errors that you get. Learn how to read them and give it a try, before posting here It says it cannot find the symbol lengh. Check your book or the tutorial you took the code from. It should say …

Member Avatar for javaAddict
0
1K
Member Avatar for orcboyx

This thread has been solved but I would also like to add a small suggestion. If for some reason you want to use ints for boolean expressions, why don't you make a class for it. Call it: BoolInt. Have it have one int [U]private[/U] attribute and with the help of …

Member Avatar for javaAddict
-1
886
Member Avatar for prem2

First of all what errors do you get? Second, does the 'one' class has a 'newinstance' method? I don't see any so there is your error. You haven't defined a newinstance method. Maybe you should try this: [CODE] try { one obj = (one)Class.forName("one").newInstance(); obj.one(); } catch (ClassCastException cce) { …

Member Avatar for javaAddict
0
87
Member Avatar for Member 784795

Start coding those method in one class. In another put your main method and call those methods. What this: "[U]A program that will ask only 3 times for inputting the correct password.[/U]" has to do with the rest of the requirements. Start some coding and don't expect us to do …

Member Avatar for javaAddict
0
71
Member Avatar for merinajose

[QUOTE=merinajose;1235466]Hi I need code for searching the records in a table for specified conditions using jsp[/QUOTE] Start a new thread and post some code

Member Avatar for Member 784740
0
1K
Member Avatar for NewOrder

About this problem: [CODE] if(All.charAt(count2)!=dot) { sNumber = sNumber + All.charAt(count2);/ it wont let me initialize this command, i dont know how to initialize it, so that it would work } [/CODE] I cannot find where you have initialized the sNumber. Maybe you should change at the beginning of your …

Member Avatar for Unbidden Ghost
0
170
Member Avatar for mundvawala

Also, you put "pieces" in some of the elements of the array. The rest are unfilled, so they are null. I would suggest to fill all the array with empty Strings "" in order to avoid the NullPointerException. Then put to the elements you want the "pieces". And if you …

Member Avatar for Krefie
0
167
Member Avatar for daudiam

Actually you have a small misunderstanding with that logic. The API says: "The ordering imposed by a Comparator c on a set of elements S is said to be consistent with equals [B][U]if and only if[/U][/B] " The API says at some point that the compare method does not have …

Member Avatar for daudiam
0
227
Member Avatar for idontknow19

[QUOTE=idontknow19;1262453]no i not study arrays yet.my mentor said.i need to create a program a long method without using the methods or package in arrays like array.sort. BUT my mentor said I need to input 5 numbers or integers...thats only my problem.im stuck or i get confused what to do next.what …

Member Avatar for javaAddict
0
1K
Member Avatar for jt86442

The fonts of what? If you are referring to Swing then I believe that the classes have set methods for that. Look at their APIs

Member Avatar for NormR1
0
628
Member Avatar for daudiam

Check the API of ArrayList. [U]Never[/U] assume that classes and methods do what you think they do. The argument you have specified is the initial capacity of the ArrayList, not the size. Check the constructors of the ArrayList class. From the API: [QUOTE] Each ArrayList instance has a capacity. The …

Member Avatar for daudiam
0
81
Member Avatar for eswaramoorthy
Member Avatar for djenoe

Don't forget that if you need to compare Strings use the equals method. The code provided will not work because this: "==" does not work when comparing Strings. Also another mistake to your code [I]Taywin[/I] is that you have getAnswer non static. You cannot call it the way you have …

Member Avatar for javaAddict
0
137
Member Avatar for ippomarley

Try "right" clicking on the file and select "Properties". You will find the exact location and file name to use at your code

Member Avatar for peter_budo
0
131
Member Avatar for noon580

[QUOTE=ziniya;1256669]pls solve my problem urgently 1 * *** ***** *** * 2 ***** ** ** * * ** ** *****[/QUOTE] Why ?

Member Avatar for masijade
0
118
Member Avatar for nlanka

First check some html and javascript tutorials because that code is totally wrong. It needs to rewritten from the beginning. I would suggest this: [URL="http://www.w3schools.com/default.asp"]http://www.w3schools.com/default.asp[/URL] First learn about html and then move to javascript

Member Avatar for Taywin
0
104
Member Avatar for azhar27

I haven't tried that code. You need to check it yourself. But I would suggest this, if you want to have more chances of succeeding. [CODE] <% request.setAttribute("[B][COLOR="green"]info[/COLOR][/B]", "info from page1"); %> .... <%=request.getAttribute("[COLOR="green"][B]info[/B][/COLOR]")%> [/CODE]

Member Avatar for javaAddict
0
297
Member Avatar for red_evolve

[QUOTE=lonely gurl;1120877]guys, help m plz.. i need a java code that separate a number from words..[/QUOTE] Be more specific, start a new thread and show what you have done so far

Member Avatar for skylover87
0
560
Member Avatar for sara khan

Have you tried to check the error messages you get? The first piece of code will result to a NullPointerException since you don't initialize the array. If you didn't accidentally forgot to do that, then forget what you are doing and try to learn basic java first. At the second …

Member Avatar for sara khan
0
230
Member Avatar for vanitha ravi
Re: java

Check the announcement at the top of this forum: [B]Starting "Java" [Java tutorials / resources / faq][/B] It has plenty of resources to choose from

Member Avatar for javaAddict
0
50
Member Avatar for fankoff

Have you declared the variables username, password? Perhaps you need to show more code. Also the above code is html code, not a scriplet. Does it compile.

Member Avatar for javaAddict
0
175
Member Avatar for AbhikGhosh

Just a suggestion for you to check. It might not work: [CODE] var url = 'showDetails.jsp?abc =' + detailsForm.sltdUser.value; alert(url); // works fine window.open(url); [/CODE]

Member Avatar for javaAddict
0
135
Member Avatar for ceyesuma

Check the constructor of the class java.util.Date at the API. I doubt the there is one that takes as argument the String that you are trying to pass [U]txtFieldArray[i].getText()[/U] Check the API of java.util.Date as well as the class: [B]java.text.SimpleDateFormat[/B] And you will get your answers: [URL="http://java.sun.com/j2se/1.5.0/docs/api/java/text/SimpleDateFormat.html"]http://java.sun.com/j2se/1.5.0/docs/api/java/text/SimpleDateFormat.html[/URL]

Member Avatar for javaAddict
0
2K
Member Avatar for Umar Ali

What you posted is unreadable. Use code tags. Click the button: (code) and place your code inside

Member Avatar for NormR1
0
104
Member Avatar for anjali_nair1286

Show some code, give more information and use: [CODE] request.setAttribute("key", object); request.getAttribute("key"); [/CODE]

Member Avatar for javaAddict
0
53
Member Avatar for joe_ojah

Try looking at the API for JOptionPane class. Focus on the static methods that start from show.....

Member Avatar for javaAddict
0
158
Member Avatar for ravi25a

Try to run the query first at the sql prompt and see if it works then takes it and put it at your statement. Post the errors that you get.

Member Avatar for parry_kulk
0
197
Member Avatar for fankoff

I assume that the according.jsp is an empty jsp that has only DB code and nothing else. Then when you are done, you can write code using the <forward> tag to redirect to the initial page. You can also send the data saved and display them. This time you can …

Member Avatar for fankoff
0
136
Member Avatar for intes77
Member Avatar for denmiller3
Member Avatar for parsa.moshrefi

[CODE] <a href="page.jsp?param1=value1&parame2=value2&param3=value3">Link</a> [/CODE] Notice that only the first parameter has the '?' . The rest are separated by the '&' symbol. And at the jsp you can do this: [CODE] String a = request.getParameter("param1"); // value1 String b = request.getParameter("parame2"); // value2 String c = request.getParameter("param3"); // value3 [/CODE]

Member Avatar for periyasamy1904
0
74
Member Avatar for idlackage

Loop the array and print only those that are not zero. Also I would suggest to initialize the array: shapeIndexes to have all -1 as initial elements. With the way you initialize it, it begins with zeros. So if it happens that the selected shape is the first element of …

Member Avatar for javaAddict
0
97
Member Avatar for aravchr

How do you want it to be passed? I mean if don't click a button, you must perform an action to send the data. If the user enters a value at the input field, then the user must also do something to send the data. What do you want the …

Member Avatar for jwenting
0
92
Member Avatar for mohamed mo'men

[QUOTE=mohamed mo'men;1237704]there is Inheritance mean subtype polymorphism or there not have same job ??[/QUOTE] What ?

Member Avatar for xonglennao
0
63

The End.