1,963 Posted Topics

Member Avatar for Sunshineserene

The code has already been provided posts ago. It has been also established that we shouldn't give ready code, rather than help the poster find the solution. Now why do you think [I]mnmw[/I], that Megha's post had any meaning? He posted code that had already been posted and gave solution …

Member Avatar for jon.kiparsky
1
526
Member Avatar for hazeeel

But why would you want to add them. I assume that they are coordinates. What is the meaning of adding coordinates? Sure they are numbers and arrays and you can add them, but I don't seem to know any mathematical theorem that it requires the addition of the X,Y,Z coordinates. …

Member Avatar for javaAddict
0
52
Member Avatar for capsitan

Your code tags should end. Also you need to be more descriptive. What your program is suppose to do? What kind of errors do you get and what output

Member Avatar for tong1
0
416
Member Avatar for ueoptimum

[I]jon.kiparsky[/I] has already solved your errors. Read his suggestions and your error messages. You have an else without an if. It is: [CODE] if () one command; else one command; [/CODE] For multiple commands use {} When you don't put {} at the [I]if[/I], only the first line after the …

Member Avatar for javaAddict
0
136
Member Avatar for playdaguigame

Have you even bothered to read it? It says: "Column not found". Now what do think could be the problem? Also the error message tells you exactly the line where that error occurred. It is not that difficult to understand that you are trying to read a column that doesn't …

Member Avatar for javaAddict
0
101
Member Avatar for herberwz

If you want to add a picture at the GUI, you need to look at the API of the JLabel class. It has a constructor that takes as argument an Icon. Or you can the method: setIcon. From the API the argument (Icon) is an interface, so you need to …

Member Avatar for herberwz
0
157
Member Avatar for hazeeel
Member Avatar for NewbyChic

Inside a for-loop you will have a System.out.print("*") How many times will this for loop will execute will determine how many * you will have at each line. Then you will put it in another for-loop which you will use to determine how many lines you will have: [code] for …

Member Avatar for javaAddict
0
178
Member Avatar for steveh000

Check out the indexOf method of the String class: [CODE] String s1 = "www.google.com/search/" String s2 = "google" int index = s1.indexOf(s2); System.out.println(index); // 4 [/CODE] If "index" is -1 then the s2 is not inside the s1. Else it returns the position of the s2 inside the s1, which …

Member Avatar for steveh000
0
115
Member Avatar for sugumarclick

You are calling the next method twice, without checking if it has a next element: [CODE] out.print("coming..................:"+itr.next()); out.println(itr.next().toString()); [/CODE] The first next call will return since you did that check at the while, but the second will not because you take the next element and you don't know of it …

Member Avatar for sugumarclick
0
689
Member Avatar for boiishuvo

You need to post what errors do you get. Don't expect that is easy for us to take your code and run it. Or that we read it line by line and expect to understand what you were thinking. Also I happened to run the latest code and this is …

Member Avatar for javaAddict
0
185
Member Avatar for anushri

Your code is unformatted and you failed to indicate where the error is. Reade the error messages that you get. Don't expect others to do it for you: [QUOTE]Exception in thread "main" java.lang.NullPointerException at Bank.main(Bank.java:25)[/QUOTE] At the file Bank.java line 25 you got a NullPointerException. You are trying to use …

Member Avatar for nickguletskii
0
171
Member Avatar for Mylsamy

There is no such method, you need to create your own: [CODE] String strNum = "fifty"; int num = 0; if (num.equalsIgnoreCase(fifty)) { num = 50; } [/CODE]

Member Avatar for javaAddict
0
136
Member Avatar for Sugarskull

I agree with you guys(Ezzaral, masijade). I have seen many threads here where people just post the code, the line the error is and the message the compiler gives. But the compiler explicitly says what EXACTLY is the problem. It says the line and explains the problem and sometimes says …

Member Avatar for Ezzaral
0
276
Member Avatar for srdva59

What class is this: d.ymd ? Did you write it. How do you expect to call d.dmy if such method doesn't exist. Look at the API of java.text.SimpleDateFormat, for formatting Date objects to Strings

Member Avatar for javaAddict
0
64
Member Avatar for sreya.rakhit

You can create a separate java file. That class would be the form. It will have fields and labels and buttons. When you select the option, instantiate that class. It should extend the JFrame class. So when you create that instance and make it visible enter whatever you want. You …

Member Avatar for javaAddict
0
123
Member Avatar for P00dle

Better use the log4j.properties option better. Or if you look at the API you can programaticaly configure the log4j. Also check this out: [URL="http://www.vipan.com/htdocs/log4jhelp.html"]http://www.vipan.com/htdocs/log4jhelp.html[/URL]

Member Avatar for P00dle
0
112
Member Avatar for jemz
Member Avatar for elapse0308

If you want something converted to int or double do what you [U]correctly[/U] did [CODE] interest = (int)(.....); [/CODE] Of course you were trying to convert rate to a double too. I haven't looked what is its type but if it is not double and you want it to be …

Member Avatar for javaAddict
0
111
Member Avatar for mani_1991

Try to print this: [CODE] String s11="INSERT INTO "+table+" "+" VALUES(mani,'"+image+"')"; [/CODE] Before executing it. What happens is that when the String s11 is constructed this is trying to take value: [B]"+image[/B]; It "converts" the image java instance to a String. Meaning this is called: [CODE] String s11="INSERT INTO "+table+" …

Member Avatar for javaAddict
0
265
Member Avatar for hazeeel

You don't use arrays, you use a [URL="http://download.oracle.com/javase/1.5.0/docs/api/java/util/Vector.html"]Vector[/URL] Search for tutorials about Vector and/ or lists in general (ArrayList) With Vectors you can add as many elements as you want it doesn't have a fixed size. Whenever you add more its size increases automatically, so you can add more. You …

Member Avatar for hazeeel
0
110
Member Avatar for Sunshineserene

From the errors I assume that we are dealing with Applets so there shouldn't be any main method. If you want to use something anywhere then declare it, create it and initialize it. Without some code to go with the errors it is difficult to suggest anything than speculations

Member Avatar for NormR1
0
239
Member Avatar for aditya027

Try to read what the hashCode method really does and what it is used for. Check the API of the Object class, as well as the API of the HashMap. Also don't use '==' to compare Strings. Use the equals method of the String class. And you also need to …

Member Avatar for java_programmer
0
95
Member Avatar for KcNaveen

This is a java forum not a jsp forum. Search for the jsp forum. [QUOTE] if you know show it please [/QUOTE] Why? Why would we show you the code? What do we have to gain?

Member Avatar for javaAddict
-1
162
Member Avatar for nikk

[QUOTE=simitis;1088922]You just need: name=null; and garbage collector will do the rest.[/QUOTE] Can you be more specific on that? What do you mean? Can you post some more code? What is it supposed to be set to null?

Member Avatar for selvanandhini
0
2K
Member Avatar for chitian5057

Even if you do write code that create a file with the .jsp extension and save it at the server, what would be its use. You would still need to call it and display it to browser. Even if you create a dynamic link based on the name of the …

Member Avatar for javaAddict
0
160
Member Avatar for kunalsankpal

[QUOTE]Remainder after dividing 278 by 10 = 2[/QUOTE] The Remainder is not 2, it is 8. (modulo operation) 278/10 = 27.[B][COLOR="Green"]8[/COLOR][/B] Take the number as a String. Actually it should be treated as a String to begin with: "458343238143257" Use the String class to convert that into an array of …

Member Avatar for kunalsankpal
0
113
Member Avatar for JimBoCol
Member Avatar for JimBoCol
0
141
Member Avatar for ben1

[QUOTE=jon.kiparsky;1295878] [CODE] private While w; public static void main(String[] args) { w = new While(); } public While() { printLoop(); doSomethingElse(); etc. } [/CODE] [/QUOTE] The Code that you wrote [U]jon.kiparsky[/U], will not compile. Please don't post code that you haven't tested. Also it is better to learn to call …

Member Avatar for ben1
0
130
Member Avatar for Sam_john_2010

When do you want the validation to happen? When you click the submit button? An easy way would be to have a button(type="button") and an onclick event: [CODE] <input type="button" value="Click" onclick="validate();" /> [/CODE] Then define a [ICODE]validate[/ICODE] function, inside it use javascript to take the values of the fields …

Member Avatar for javaAddict
0
78
Member Avatar for majestic0110

This is a bit late for answering but I am surprised that no one mentioned anything like Gundam Zeta or Yamato. Well if you want to hear it from someone who has seen a lot then here it is: [U]Series:[/U] Yamato Season 2 (Unfortunately in the US known as Starblazers) …

Member Avatar for Kusanagi03
0
353
Member Avatar for jjhames

How are we suppose to know what is wrong? Do you get any errors? Also at the toString method you do [U]correctly[/U] this: [CODE] public String toString(){ StringBuffer sb = new StringBuffer(); for(int i = 0; [B][COLOR="Green"]i < this.count[/COLOR][/B]; i++) sb.append(items[i] + ", "); return sb.toString(); } [/CODE] You use …

Member Avatar for javaAddict
0
131
Member Avatar for rishabh_pesit

when you submit the form, what is the action attribute. Maybe you need when each button is clicked to submit to a different jsp page. From there you will need to retrieve the data from request: [CODE] <a href="retreive.jsp?EmployeeID=<%=previousId%>">Previous</a> <a href="retreive.jsp?EmployeeID=<%=nextId%>">Next</a> [/CODE] You will also need to post more code …

Member Avatar for javaAddict
0
116
Member Avatar for chandini123

Because this is null: [CODE]request.getParameter("txtname")[/CODE] Try to learn first jsp before attempting such code. You need to use javascript. And don't do that: [CODE]<% out.println(....); %>[/CODE] Use <%= ....%> . It is the right way.

Member Avatar for javaAddict
0
121
Member Avatar for Agent Cosmic

I have never tried what you want to do but a quick look at the API will get you what you want. Have you tried looking at the API of the JButton class. If you look at the constructor there is one that accepts an Icon. If you search the …

Member Avatar for Agent Cosmic
0
104
Member Avatar for therstonsplace

The error says: test.java (at line 3) What code do you have at lines 1,2 ? Have you posted the entire code? What java version are you using? Scanner is available at 1.5 and later

Member Avatar for therstonsplace
0
132
Member Avatar for mukulnimker

There shouldn't be any problem with NetBeans or any other IDE. The code not working rarely has anything with the IDE. If you have some code that you can't get to work just post it with specific questions. But first read some tutorials on how to read data from database …

Member Avatar for mukulnimker
0
151
Member Avatar for coroll

Try to print the query, and then take it the way it is and run to an sql editor: [CODE] String q="select order_num from Order where recev_fname='"+itemn+"'"; System.out.println("Qeury: "+q); [/CODE]

Member Avatar for javaAddict
0
316
Member Avatar for mith_cool

What errors do you get? Also it is good to declare this: [ICODE]BufferedReader br=new BufferedReader(new InputStreamReader(System.in));[/ICODE] outside the for loop. Also you'd better add this in order to know what was the problem: [CODE] catch(Exception e) { System.out.println("Problem with the program: "+e.getMessage()); } [/CODE]

Member Avatar for javaAddict
0
125
Member Avatar for coroll

In One jsp have the form with all the fields and a submit button: [CODE] <form [B][COLOR="Green"]action="two.jsp"[/COLOR][/B] name="someName"> ..... <SELECT name="month"> <OPTION selected value="01">1</OPTION> <OPTION value="02">2</OPTION> </SELECT> ..... <input type="submit" value="I authorised this transaction"> </form> [/CODE] And in the other jsp: two.jsp [CODE] String monthSelected = request.getParameter("month"); [/CODE]

Member Avatar for javaAddict
0
6K
Member Avatar for kulrik

[QUOTE=WILSONOTIENO46@;1289802]WRIGHT A PROGRAM IN C WHICH REQUEST SCORES STORES THEM IN AN ARRAY , THEN IT CALCULATES THE MEAN, Deviations FROM MEAN, STD DEVIATION AND THEN IT PRINTS THE THREE(MEAN, AVERAGE, DEVIATIONS, STD DEVIATION.)[/QUOTE] Don't yell( meaning don't use capitals) we are not DEAF. Also start a new thread. Also …

Member Avatar for tong1
0
237
Member Avatar for benaziraziz

what is a school time table project. explain further and post your requirements

Member Avatar for javaAddict
0
51
Member Avatar for VJTechno

Why should we write such program. I have no use for that, and I am not interested in finding the longest substring in two given strings that is common to both. Some things are better left unknown. If you want to find the longest substring in two given strings that …

Member Avatar for VJTechno
0
157
Member Avatar for shahin_198

[QUOTE] Hi Friend, Am offering ready made project in java...it cost of 10000 payment and am having more project like this if yr friends interested u can make them call to me... If u needed contact me.... [/QUOTE] The 10000 is it in US Dollars or in Euros?:) Because I …

Member Avatar for peter_budo
0
139
Member Avatar for rogue005

In the same way you do it in any other class with any other object. In one class make that object as a global attribute and either set it to be public or use get/set methods. [CODE] public class OneFrame { public SomeObject so = null; // create it in …

Member Avatar for Ezzaral
0
3K
Member Avatar for ashwiniku

Check the API of the ArrayList class. There is a remove method that you can use. Or you can use the Vector class that is similar to the ArrayList. Check their APIs to find a method "remove" that is suitable for you.

Member Avatar for jon.kiparsky
0
604
Member Avatar for aditya027
Member Avatar for Mylsamy

Why it is saved like this: a%20b%20c%20d How to you send the values and how you retrieve them?

Member Avatar for masijade
0
211
Member Avatar for ashwiniku

The error is very clear: [QUOTE]java.lang.String cannot be cast to java.lang.Integer[/QUOTE] You are trying to cast a String object to an Integer. That cannot be done. They are not of the same type. The error tells you at what line of your file that happened, so you can correct it. …

Member Avatar for ~s.o.s~
0
4K
Member Avatar for kishore sy

Have you tried looking at the BigInteger class: [URL="http://download.oracle.com/docs/cd/E17409_01/javase/6/docs/api/java/math/BigInteger.html"]http://download.oracle.com/docs/cd/E17409_01/javase/6/docs/api/java/math/BigInteger.html[/URL]

Member Avatar for kishore sy
0
557

The End.