2,443 Posted Topics

Member Avatar for captain.charli

So what is your question? No one is going to write these programs for you.

Member Avatar for Phaelax
-1
74
Member Avatar for hlnren

[QUOTE=thekashyap;329975]So what's teh question and where is teh "class Scanner " ?[/QUOTE] Scanner is a part of the JDK Since 1.5 (if not 1.4.2). @OP Before you start the loop, you need to declare and initiate an array with the variable "value" after your first question. [code] int arrayname = …

Member Avatar for keya_datta
0
113
Member Avatar for shishir

[QUOTE=peter_budo;331166]Try this way ;) [code] public String ins_Deposit(String userid,int amount,String branch,String bank) throws SQLException { Statement ps = null; [COLOR="Red"][B]String output;[/B][/COLOR] try { ps = conn.createStatement(); String query="INSERT INTO BANK_TRANSACT VALUES('"+userid+"',sys_date,"+amount+",'D','"+branch+"','"+bank+"')"; int result = ps.executeUpdate(query); if(result>0) [COLOR="Red"][B]output = [/B][/COLOR]"Transaction successfully completed,amount will be credited to your account within 24hrs. "; …

Member Avatar for peter_budo
0
148
Member Avatar for staneja

What happens, if it makes it all the way to the last nested if statement and that statement evaluates to false instead of true? What value would c have then? None because it hasn't been initialised. Add an else to the last nested if and the error will go away.

Member Avatar for staneja
0
103
Member Avatar for san_fran_crisko

Look at this from your code: [code] try { //Reads keyboard input and acts accordingly input = stdin.readLine(); }catch (IOException ex) { System.out.println("Problem reading from the keyboard"); iInput = Integer.valueOf(input); // convert String to Integer } [/code] You convert your string input to an integer only when an exception happens. …

Member Avatar for san_fran_crisko
0
147
Member Avatar for radhikaDS
Member Avatar for hbk619

[quote] [code] package class card; [/code] [/quote] I'm sorry, but don't you see anything wrong with this line? Both package and class are reserved words of a type that can't be used together, so it is more than passing strange to see them one after the other for one. For …

Member Avatar for hbk619
0
145
Member Avatar for kishore5001
Member Avatar for Mushy-pea
0
172
Member Avatar for Thendral

Well, first of all, it would be much safer and reliabe to use a PreparedStatement rather than a Statement. Second of all, a JSP is meant for viewing, changes/actions should happen in a Servlet, and scriptlets should not be used at all in JSP. Also, if you must actually check …

Member Avatar for masijade
-1
767
Member Avatar for bluebird

If you are using JDK 1.5 or later, check out the "format" method of String. And actually follow and read (completely) the "format string" link contained within the description for that method.

Member Avatar for bluebird
0
125
Member Avatar for Mizu

Of course there will be some changes, but they should be minor. Except that, from other examples I've seen, most of your SQL statements will need to be rewritten.

Member Avatar for jwenting
0
99
Member Avatar for xgringo

Change [inlinecode]mv $file "$file".das[/inlinecode] to [inlinecode]mv $file ${tmp}.das[/inlinecode]. It was just a typo.

Member Avatar for masijade
0
139
Member Avatar for Monyet

You're problem isn't, however, in updating the instance variable. m and n are getting updated just fine, with what you are doing. What is not working, is that the array is not dynamically changing size along with those variables. That is not the way it works. You need to redefine …

Member Avatar for masijade
0
127
Member Avatar for mr.sweetchuck
Member Avatar for SIL3NCE
Member Avatar for ajay_tabbu
Member Avatar for masijade
0
130
Member Avatar for vaniprahalathan

Maybe you're looking for a splash screen. Check out this article: [url]http://www.javaworld.com/javaworld/javatips/jw-javatip104.html[/url] Edit: And that "give me the idea immediately" is extremely rude, whether prefixed with "please" or not. We are not here to serve you.

Member Avatar for masijade
-1
115
Member Avatar for vinod_javas
Member Avatar for Primo
Member Avatar for Thendral

Read the JDBC tutorials at Sun, the JDBC documentation for the PostGreSQL Driver (once you download it), and the J2EE tutorial at Sun.

Member Avatar for jwenting
0
108
Member Avatar for nathanpacker

tar keeps the directory path in place by default. This behaviour that your describing would be very unusual for a tar command. Something special is being done, probably an alias replacing tar with a special call (although I don't know of any options to tar that would cause this behaviour), …

Member Avatar for nathanpacker
0
123
Member Avatar for mengani123

[QUOTE=kashko;320678]Define validate!!!! Define validate!!!! Define validate!!!! Assuming you mean verify it could be a valid IP address even if no one is using it, then you can do this with String Tokenizer or Stream Tokenizer String tokenizer splits the string into chunks using a delimiter. You will have to consider …

Member Avatar for masijade
0
239
Member Avatar for rpjanaka

You cannot store an integer value as an integer, and with a leading zero. I assume you only need the leading zero when printing the number, right? Than look into the format method for String, if you are using at least 1.5. (And follow the "format string" link found in …

Member Avatar for masijade
0
4K
Member Avatar for Venks

What?! No idea what you are asking. Please explain, in some detail, but without writing a novel, what it is you want to do.

Member Avatar for kashko
0
102
Member Avatar for jan1024188
Member Avatar for amodam007

This forum is about neither asp nor JavaScript. JavaScript != Java. Please find a forum dedicated to either asp and/or JavaScript and ask your question there. You will get much better results.

Member Avatar for masijade
0
71
Member Avatar for vinod_javas

No. You can obfuscate your code, or possibly try to create a native executable rather than a jarfile but both of these are equally useless. If someone wants your code they are going to get it. The only way you prevent them getting your code is to not distribute it. …

Member Avatar for jwenting
0
159
Member Avatar for vaniprahalathan
Member Avatar for Monyet

Please explain what you expect to see as output, and what you are seeing as output, as well as what was provided as input. Also, post any exceptions you may be getting.

Member Avatar for MacGyver Orca
0
135
Member Avatar for Hellodear

And, of course, as mentioned in peter_budo's first post, that is JavaScript, not Java. Java != JavaScript. Find a JavaScript forum somewhere, rather than a Java Forum.

Member Avatar for masijade
0
179
Member Avatar for LSPUWILLC
Member Avatar for jwenting
0
162
Member Avatar for thecabeza

Then what you are getting from your JOptionPane is a String. You need to convert this String to a char. Here is an example (I am assuming you only have to deal with one letter): [code] char letter = uppercaseString.toCharArray()[0]; [/code] I assume you know what to do with the …

Member Avatar for masijade
0
204
Member Avatar for katharnakh

Because the path used will not function on a unix machine. The backslants will not work as a path on a unix machine and the double backslant at the beginning of the path also means absolutely nothing to a unix machine. To access a windows file from a unix machine …

Member Avatar for masijade
0
113
Member Avatar for nehashri

Even when you use odbc, from Java, you are using jdbc (it is called the jdbc-odbc bridge for a reason). And the advantage of using a real driver over the odbc one, is that the odbc driver is severly limited (and, if I remember right, not even thread safe, which …

Member Avatar for nehashri
0
162
Member Avatar for peter_budo
Member Avatar for MONKEYMAN
Member Avatar for masijade
-1
108
Member Avatar for yannick1985

Bad disguise of a homework question if, you ask me. So, do your own homework. As a hint, look at the man pages for the command sort. Then use a for loop, a counter variable, if, and echo (in that order).

Member Avatar for masijade
0
103
Member Avatar for dami06
Re: Gui

[url]http://java.sun.com/docs/books/tutorial/ui/index.html[/url]

Member Avatar for iamthwee
0
113
Member Avatar for jeet_portal

You should move it out to a Servlet, bean, custom JSTL tag, or other application context item. This type of code should never be found in a JSP. Other than that, yes it is possible. Try going through the following: [url]http://java.sun.com/j2ee/1.4/docs/tutorial/doc/[/url] (although it is one version outdated now)

Member Avatar for jwenting
0
159
Member Avatar for jeet_portal

JavaScript to do it directly at the source or post the info in a submit to a servlet and let the servlet mail it using JavaMail. Here is something to get you started on the servlet side: [url]http://java.sun.com/j2ee/1.4/docs/tutorial/doc/[/url] And, no I am not going to give you the complete code …

Member Avatar for jwenting
0
141
Member Avatar for kavitha0904

Sorry, misread. Checked Exceptions are exceptions that should be caught by your code. Unchecked Exceptions are exceptions that are based from RuntimeException and are not expected to be caught by your code. They indicate an unusal Runtime error/condition.

Member Avatar for jwenting
0
72
Member Avatar for Pauer100

It is frowned upon to place classes in the "main" or "default" or "unnamed" package. And this is one of the problems that arise from that. Place each of these classes into a package, then import package.Employee and everything will be okay. Also, if they are in the same package, …

Member Avatar for Pauer100
0
140
Member Avatar for The Dude

100% 0 miles 251 secs. Got a little lucky, in that they didn't ask for Nebraska, Kansas, Tennessee, and the like until I had a state that should at least touch a corner of them so I had some reference on those. If those types of states come first, you …

Member Avatar for masijade
0
201
Member Avatar for ajay_tabbu

The only thing I can see, at a quick glance is on line 19. Take a close look at that [b]L[/b]ine.

Member Avatar for iamthwee
0
87
Member Avatar for iubike

Well, your trying to match "Exit" and you entered "exit". It is case sensitive, you know. If that is truly the case try the following [code] while ( uc($command) ne "EXIT" ) { // instead of while ( $command ne "Exit" ) { [/code]

Member Avatar for masijade
0
100
Member Avatar for mitaldoshi

Commuter Engineering. Does this mean that you sit beside the highway counting cars and attempting to think of a better way to get that many people through that area? ;-) Here are a few, but you should really think for yourself: Yahtzee Chat Chess Checkers All the other standard projects.

Member Avatar for jwenting
0
98
Member Avatar for rpjanaka

No, you don't need to. Anything you print to System.out will show up in the catalina.out logfile (as long as you have that activated).

Member Avatar for masijade
0
574
Member Avatar for ronakp25

That nobody ever reads the documentation and then attempt to solve their own problem anymore. I am truly getting sick and tired of the question "How do I deploy my application in blah blah blah?" RTFM, try it, then, if you have a problem, ask a specific question. Sheesh.

Member Avatar for masijade
-1
92
Member Avatar for Abhilashsr001

No. You seem to be combining too manythings in too many places, and in improper manners at that. Rather than stating what technology you want to use to accomplish what, simply 1. describe what you currently have (in some detail) 2. describe what you want to achieve (in some detail) …

Member Avatar for masijade
0
101
Member Avatar for ankit_the_hawk

simply go to java.sun.com, then to the downloads section for j2se/jse (however they are naming it now) and download the newest (the current link) or not more than one down from that.

Member Avatar for aniseed
0
156

The End.