4,084 Posted Topics

Member Avatar for wallet123

a few remarks: since this is about the same application as your other thread, you may want to keep the questions in that thread. also, you are comparing values of String objects using '==' which you shouldn't do. on a few places, you already use equals(IgnoreCase) which is the correct …

Member Avatar for stultuske
0
127
Member Avatar for gourav1

yes, that is possible. just take a look at [URL="http://www.daniweb.com/software-development/java/threads/401907"]this thread[/URL].

Member Avatar for stultuske
0
375
Member Avatar for sirlink99

and how will you 'show' this image to your application? will it be typed, will it be read as a .jpg, will you type a 'y' or use your keyboard to create the form of a 'y' using '-', '/', ..., will you 'show' it using a webcam?

Member Avatar for harinath_2007
0
177
Member Avatar for asif49
Member Avatar for krishnisilva
Member Avatar for CodeJava1

what code? except for the toString method, there are only mock methods that are labelled as 'TODO'. what exactly do you need help with?

Member Avatar for CodeJava1
0
255
Member Avatar for Joshua73

ow key, I'm not entirely sure here ... is this code all within one class, are it two classes ... can you post the entire code of your application, including the complete main method? I think the problem is that you call letterGrade before test1 was assigned a value, and …

Member Avatar for stultuske
0
262
Member Avatar for vinay.tmr

and also, if you run it through the command line, the commands you used to compile/run your application might come in handy

Member Avatar for jwenting
-1
3K
Member Avatar for wallet123

here's the answer I gave in your previous thread :) it's just a simple comparison between while and do-while. [QUOTE=stultuske;1734983] ... to answer your question about the do-while the main difference is when you run your check in the while loop, you check if the expression is valid before you …

Member Avatar for stultuske
0
134
Member Avatar for wallet123

a and B are String objects. you never should compare equality using '==' between two objects. this will work for primitives, but for objects, you should use the equals or the equals method (or a method derived of the equals method) [Code=Java] if ( a.equals(B)) [/Code]

Member Avatar for wallet123
0
98
Member Avatar for n3red

I don't usually write code in the middle of the night, well ... at least not during the week for my employer, since I don't have VPN access (yet :) ) but still, I can spend days wondering over how something is supposed to be implemented, or how to solve …

Member Avatar for hericles
0
109
Member Avatar for Empireryan

still ... as dmanw100 said: if you don't want your original array to be altered [QUOTE=dmanw100;1733894]copy that array into the result array for the function[/QUOTE]

Member Avatar for dmanw100
0
2K
Member Avatar for Azmah

there I was thinking it was a mathematical operation. as for the result, nyup, * has the upper hand there, so 6+20, not that hard to figure out :)

Member Avatar for BDove
0
2K
Member Avatar for warlord902

By using a Static Initialization Block. Just check this [URL="http://docs.oracle.com/javase/tutorial/java/javaOO/initial.html"]tutorial[/URL]

Member Avatar for warlord902
0
217
Member Avatar for wallet123

create two arrays one containing 1, 2, 3, ... , 19 and one containing one, two, three, ..., nineteen then create the same kind of arrays, that 'll deal with the decimals: 20,30 twenty, thirty, ... do the same for hundreds and thousands and use indexes to find the correct …

Member Avatar for wallet123
0
713
Member Avatar for wallet123

[QUOTE=Ms New to Java;1733386] String a =(String)(JOptionPane.showInputDialog(null, "Automatic Teller Machine\n [B] Balance Inquiry\n [D]Deposit\n [W] Withdrawal\n [Q] Quit\n Select you Options: ","Automatic Teller Machine",JOptionPane.PLAIN_MESSAGE)); [/QUOTE] also, you don't need this (String) cast, since showInputDialog will give you a String object as result.

Member Avatar for wallet123
0
205
Member Avatar for umair jameel

by writing a loop and adding a print statement in it: step 1: highBorder = readInHighBorder step 2: counter = 1 step 3: while ( counter < highBorder ){ squareRoot = calculateTheSquareRootOfCounter printSquareRoot cubeRoot = calculateTheCubeRootOfCounter printCubeRoot add1ToCounter }

Member Avatar for stultuske
1
1K
Member Avatar for Ancient Dragon

doubtful Azmah, you can only edit your post for half an hour or so.

Member Avatar for Azmah
0
134
Member Avatar for anand01

what is it giving a nullpointer on? if it's on the dbUrl, try with ("dbURL"), since in your call you use lowercase letters, but in your xml uppercases.

Member Avatar for anand01
0
132
Member Avatar for Sam367

the whole JSP-servlet story is getting a bit outdated. are you planning to use JSP's with a framework (Struts, for example)? another option would be JSF, it's a newer technique then JSP. also, if you are familiar with java, you could also take a look at GWT.

Member Avatar for Sam367
0
186
Member Avatar for applejax77

you could also have given a reference to the actual String api, giving information about that method [URL="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html"]String api[/URL]

Member Avatar for hfx642
0
209
Member Avatar for PrimePackster

well ... having a positive reputation comes from people acknowledging you have knowledge enough to be considered a 'plus'. having a negative reputation can come from giving incorrect answer, spoon-feeding code, ... it's a bit logical that if the community considers you as someone who (maybe) doesn't have the knowledge, …

Member Avatar for Narue
0
207
Member Avatar for lifeworks

[QUOTE=bderooms;1732368]Hi, If I'm not mistaking the same problem and after a while I figured out what the problem was. Basically if you use a callback voteUp.vote() than the callback it's "this" variable will be unbound. To make sure it is passed well there is a method: .bind(this) which you add …

Member Avatar for stultuske
0
173
Member Avatar for jennyb

[QUOTE=scrappy57;1731014]if (question posted == assignment) { if( effort == 0 ) { S.O.P("U r not in the rite place"); } else { S.o.p("Explain your effort and which part in your code your are struggling with "); } } else { S.o.p("Explain your effort and which part in your code your …

Member Avatar for stultuske
0
119
Member Avatar for Ashenvale

the problem isn't that it only executes once, the problem is, that when it executes, ctr = studNo.length, which means that that index doesn't exist. you're trying to access sexCode[4] while sexCode[3] is the last element. but I agree with Jeff's statement, that your if-else should either be placed within …

Member Avatar for stultuske
0
136
Member Avatar for lethal.b

[QUOTE=lethal.b;1732320]But what has got me confused is, i am reading a tutorial about threads and it says once the thread has carried out its run method the thread terminates. Does this mean the thread is killed altogether? How would i keep it alive after carry out its first task?[/QUOTE] I …

Member Avatar for stultuske
0
104
Member Avatar for maxxxx

either that, or define an id, but since you pass URL as a param to that function and don't use it otherwise, that might very well solve your problem.

Member Avatar for Airshow
0
202
Member Avatar for victabk

you also posted this in the JSP forum. I suggest you close this thread, since cross-posting is not appreciated. besides, since it's a servlet/JSP matter, you'll faster find people with experience at that forum.

Member Avatar for stultuske
0
199
Member Avatar for kbrook

[URL="http://www.howtogeek.com/howto/windows-vista/using-windows-vista-compatibility-mode/"]this[/URL] is just assuming you use the latest Windows.

Member Avatar for stultuske
0
239
Member Avatar for gourav1

first of all, SCJP doesn't exist any more :) the name changed when Oracle took Java over. AFAIK, Schildt didn't write a book that has as goal to succeed in the certification exam, so I'm not sure which one you are talking about, but when I obtained my certificate, all …

Member Avatar for stultuske
0
145
Member Avatar for Pravinrasal

do you give those images an id in the html? if so, you can use this id. for instance, if your images are stored with id's img001, img002, img003, ..., imgxxx you could write a script that iterates over them, and, as long as he finds the next image, write …

Member Avatar for stultuske
0
196
Member Avatar for psomis

if you want to use jsp's, there are different ways you can go, of which I think servlets will be the easiest to start with, this doesn't however mean it's the most efficiënt or best approach. for the moment I'm working on a GWT project (Google Web Toolkit) which uses …

Member Avatar for stultuske
0
86
Member Avatar for SuchANewb

well, you don't really have a question in there, so what do you need help with? also, how far do you want your code to be able to go? just 1 + 1 or also, for instance: 1 + (2 * 3) it would also help if you add a …

Member Avatar for dheaven
0
363
Member Avatar for 03hasnam

also: just speaking for my situation - the definition of 'public holiday' tends to adapt, not only where you are, but also, who you work for. so, if you want to use your application just for yourself, my suggestion would be to use an excell file, which you can change …

Member Avatar for dmanw100
0
2K
Member Avatar for wallet123

read my post and the link in your other thread. seriously, it's a very bad idea to continue creating new threads

Member Avatar for dmanw100
0
127
Member Avatar for subone
Member Avatar for wallet123

you may be literally new to Java, but you are also literally ignoring help that's been given in the other thread about this application. have you changed anything yet? implemented the arrays as suggested? don't start a new thread, continue in the other one with the hints you were given, …

Member Avatar for peter_budo
0
160
Member Avatar for kamboz200

start a new thread, instead of reviving a dead one post your complete error message and your complete code, for I doubt this to be the line that actually causes the error.

Member Avatar for stultuske
0
241
Member Avatar for jot121

[Code=Java] int[] vals = new int[values.length]; [/Code] using this line, you make sure vals is as long as your values array is, but you don't know whether you'll have the same amount of elements. first: you don't need that counter variable, you don't need your constructor and you don't need …

Member Avatar for stultuske
0
185
Member Avatar for coding101

[QUOTE=dheaven;1731172]Perhaps you will find [URL="http://dystopiancode.blogspot.com/2011/10/useful-methods-of-string-class-in-java.html"]this tutorial[/URL] useful. It's about how to declare/use strings and the methods that the String classs has(with examples). Good luck with learning Java![/QUOTE] this 'tutorial' doesn't even show all the basic ways to initialize a String, it just shows a few of the basic functionalities that …

Member Avatar for dheaven
0
238
Member Avatar for J.S.AlKatheeeri

have you tried to use different layouts? on the swing objects there are a lot of methods that can help you out, for instance the setBounds. but how they work will depend on wheter or not you use the right layoutmanager.

Member Avatar for J.S.AlKatheeeri
0
206
Member Avatar for vb.net_beginner

same mistake as in your other function. you're overwriting the value, not adjusting it.

Member Avatar for vb.net_beginner
0
66
Member Avatar for vb.net_beginner

but to keep it simple ... you're just overwriting your value each iteration, you're not adding the next lines

Member Avatar for vb.net_beginner
0
82
Member Avatar for Mr.BunyRabit

other possibilities: whose machine did you write it on, are you using code/libraries from him (or another third partie), is this for your work, for a potential employer, for a course you're taking, .. ? here: "Im writing a java system for some one, and no contract has been established …

Member Avatar for hfx642
0
181
Member Avatar for Mr.BunyRabit

can not find .. sounds to me like that class is not in the path of your application, or you forgot to import the class in the class where you are trying to use it.

Member Avatar for Mr.BunyRabit
0
1K
Member Avatar for aiwasen

the best way to start is with a simple editor: notepad++ for instance. no autocomplete, so you'll learn the actual code and won't depend to hard on the IDE to do the work for you. the same goes for compiling. sure, an IDE can make compiling really easy, but that …

Member Avatar for stultuske
0
254
Member Avatar for gourav1

what they offered you as advice ís professional advice. do you really think that if they copy paste a text you can find by google into a post here makes it more credible? no one was mocking you, but, just like your (future) employer ánd the daniweb forum rules, they …

Member Avatar for gourav1
0
159
Member Avatar for Mr.BunyRabit

why are you sure this is IDE-related? maybe there is something in your code en/disabling certain items based on a condition. what you are giving us is quite a vague description, so it's hard to say what the issue might be.

Member Avatar for Mr.BunyRabit
0
135
Member Avatar for jpknoob

do you have <code> </code> in your file, or are they supposed to suggest code tags on this forum? does it give any result, does it give an javascript error, ... ?

Member Avatar for jpknoob
0
291
Member Avatar for gourav1

well ... servlets as technology is a bit out of date, doesn't mean it's not worth looking into, if only to get the hang of the MVC pattern. A good book to consider is [URL="http://shop.oreilly.com/product/9780596516680.do"]Head First JSP & Servlets[/URL], and I think that the JSP forum in the Web development …

Member Avatar for stultuske
0
131

The End.