2,443 Posted Topics

Member Avatar for manish250

For one, your if statement should be && not || As it is now, if it is null it attempts to do equalsIgnoreCase on that nuill reference.

Member Avatar for manish250
0
2K
Member Avatar for draven07

Well, you need to first define what it is you need help with as I have no idea what you are talking about. What does a "-3 byte array" have to do with "FileHandling" and what [i]is[/i] a "2-3 byte array" in your definition in the first place. If you …

Member Avatar for JamesCherrill
0
92
Member Avatar for someone5

In what way? Ina display, of course, simply place them next to each other. In a "query" aspect? No. Give them all "names" that start the same, maybe? Edit: Or just simply to have a handy "list" that contains them all? Yes, just use a List or array.

Member Avatar for mKorbel
0
118
Member Avatar for pramod.singh

keySet to get the keys as a set, then iterate that. Edit: Not that "next" and "previous" have any [i]real[/i] meaning in a HashMap.

Member Avatar for masijade
0
50
Member Avatar for rude04

Write a proper class, not a bad hack at a serial program. IOW [i]don't[/i] just put everything in main, and [i]catch[/i] and [i]handle[/i] (when possible) exceptions, don't just declare "throws Exception". The very least you should do is give out a proper error message rather than just dropping out.

Member Avatar for rude04
0
724
Member Avatar for Stazloz

Use String's split method to get a String[] (which you can then use in the "enhanced" for loop) then use Integer.parse(String) to get the integer values for the switch.

Member Avatar for masijade
0
122
Member Avatar for Shizuo

[url=http://download.oracle.com/javase/tutorial/essential/io/index.html]here[/url]

Member Avatar for masijade
0
171
Member Avatar for sasi_88

It's called paging. Google "[url=http://www.lmgtfy.com/?q=java+paging]Java Paging[/url]".

Member Avatar for masijade
0
63
Member Avatar for manish250

Is it "giving" [inlinecode]"SUCCESS"[/inlinecode] or [inlinecode]" SUCCESS"[/inlinecode] or [inlinecode]"SUCCESS "[/inlinecode] or .... I think you get the idea. The only lines after the print that will result in an NPE are the s.equals..., and since s contained [i]a[/i] value, seemingly, the line mesg = mesg.concat... is throwing the NPE. So, …

Member Avatar for manish250
0
180
Member Avatar for lohit kumar

Why!? [i]Why!? [b]Why!!?[/b][/i] I say! Why [i]all[/i] "beginners" [i]absolutely[/i] feel the [i]need[/i] to do this is just beyond me. I would think it would be much easier to simply Google "How do I deploy/distribute my Java app" and find out the [i]proper[/i] way to do it, rather than simply [i]assuming[/i] …

Member Avatar for Progr4mmer
0
172
Member Avatar for litchi

It probably didn't "seem" slow, it probably [i]was[/i] slow. Properly handling DB connections and network traffic is a part of writing an application and simply circumventing those by building in a manual copy step to have the data local is a crutch and [i]not[/i] a solution. You should be opening …

Member Avatar for pkulkarni89
0
753
Member Avatar for techgig

And think about whether you actually [i]need[/i] all "95000 lines" in memeory at the same time. You would be better off reading a line, processing that line, reading the next line. Only rarely do you actually need all of the data in memory at the same time.

Member Avatar for jclawson000
0
193
Member Avatar for manjarivatsa
Member Avatar for buzmay
Member Avatar for masijade
0
119
Member Avatar for intes77

Uhm, with clear() ? See the API docs, Stack [i]does[/i] have a clear method.

Member Avatar for masijade
-1
145
Member Avatar for kvass
Member Avatar for AppB

By using a website that allows it. Your computer cannot just "magically" transmit bytes through the air without some sort of device to handle the signal. So, either you hook a handy up to your computer, or you find a web service that allows "free" sending of SMS and figure …

Member Avatar for masijade
0
119
Member Avatar for java beans
Member Avatar for Pratique
Re: java

Is that the first question in the quiz? No one here is going to write it for you. Explain, in greater detail, your current problem with it. If its that you "don't know where to start", as so many here like to say, then research what exactly such a thing …

Member Avatar for masijade
0
74
Member Avatar for stephy1

Do not use scriptlets in JSP, use, at the very least, a servlet. Do not cobble together statements like that, use a PreparedStatement. Use a Connection Pool (see the documentation for your web container).

Member Avatar for ~s.o.s~
0
146
Member Avatar for coervivekmca

Do not use scriptlets in JSP. Do not cobble together statements like that, use a PreparedStatement. Use a Connection Pool.

Member Avatar for masijade
0
136
Member Avatar for coervivekmca
Member Avatar for masijade
0
88
Member Avatar for VAISHALI THAKER
Member Avatar for fugmag

Okay? So do it. You have to make sure that that method exists in the class though, of course. P.S. Do [b][i]Not[/i][/b] cobble together statements unless you [i]want[/i] sporadic SQL syntax errors and (un)intentional SQL injection attacks. See the JDBC Tutorials for PreparedStatement (and don't say you have, because you …

Member Avatar for mKorbel
0
293
Member Avatar for Zak84

probably has to do with instance variables (i.e. bad programming) in your servlets/jsps

Member Avatar for masijade
0
44
Member Avatar for samuelhenry
Member Avatar for anuj_sharma

A subclass must call a constructor of the super class. If you, as the programmer, do not program a specific super call in the constructor of the subclass the compiler will automatically add a call to the default constructor of the super class. Unfortunately, when the super class defines a …

Member Avatar for anuj_sharma
0
94
Member Avatar for WigglesMcMuffin

[url=http://download.oracle.com/javase/tutorial/uiswing/events/keylistener.html]here[/url]

Member Avatar for WigglesMcMuffin
0
105
Member Avatar for vigneshd90

Use the method getResource which will return a URL to the loaded properties file so that you can use that url to both load and later store the properties. Edit: Assuming, of course, that the URL returned is a "file:" url, if not you will not be able to store …

Member Avatar for vigneshd90
0
774
Member Avatar for MeandJava

What return type should this method be or what should the method be "called" [code]public ImageIcon(String filename){[/code] you either haven't declared a return type or have not "named" it.

Member Avatar for MeandJava
0
2K
Member Avatar for pkty31
Member Avatar for masijade
0
471
Member Avatar for rhoit

Because it is assuming that numbers that start with 0 are octal numbers. ctal numbers can only have digits from 0-7. If you only want to move files where the number is greater then 030 do [code]mv *[3-9][0-9].jpg *[1-9][0-9][0-9].jpg destination[/code]

Member Avatar for rhoit
0
451
Member Avatar for Newskin01

One note. Do not use "\n", use System.getProperty("line.separator") to get the proper, platform-dependant line ending. Edit: A second note, it is probably more effecient to simply print each line indivudually, if you can, as each String concatenation creates a StringBuffer and a new String. Or better, would be to "build …

Member Avatar for jon.kiparsky
0
2K
Member Avatar for Spirit_Guardian

For one you are trying to declare [i]something[/i] inside the main method. That doesn't work. For a second thing, [i]what[/i] is it? if it is a class, add that keyword, and put it in another java file, of course, if it is a method, then declare the return type.

Member Avatar for Spirit_Guardian
0
209
Member Avatar for yukikazemedia

Okay? So what problems are you having with it? BTW we are [i]not[/i] just going to give you any "missing" pieces.

Member Avatar for javaAddict
0
189
Member Avatar for Nahiyan

Package it as a jarfile. See [url=http://download.oracle.com/javase/tutorial/deployment/jar/index.html]this[/url] and [url=http://download.oracle.com/javase/tutorial/deployment/index.html]this[/url]. As always the [url=http://download.oracle.com/javase/tutorial/]Tutorials[/url] nearly always help, even with this.

Member Avatar for Nahiyan
-1
152
Member Avatar for PrathapSingh

It's pretty clear to me. You are trying to compile something as though it where source code using JDK version 1.4 when it is actually code that needs a JDK of 1.5 or higher.

Member Avatar for masijade
0
59
Member Avatar for Sidd_
Member Avatar for Danii

That the method returns an int (as its declaration will show), and these are the lines that do that, obviously.

Member Avatar for masijade
0
676
Member Avatar for abcdef1

[code] $abc =~ /^ # Beginning of line [^\d]{2,4} # 2 to 4 characters as long as they are not numbers < # a literal less than sign ([^>]+) # at least one and all characters except (essentially until) a # greater than sign. This text will be remembered. # …

Member Avatar for masijade
0
161
Member Avatar for sj5536
Member Avatar for stephy1

Because you are doing this [i]completely[/i] wrong. From front to end. See the links I gave you in your other [url=http://www.daniweb.com/forums/thread345993.html]thread[/url].

Member Avatar for masijade
0
118
Member Avatar for stephy1

That is not a JSP question, technically, and this is the wrong forum for a JSP question, anyway, there is a JSP forum, that is an HTML question. The real question is, why would you want a form without an action? What purpose would it serve? That is just some …

Member Avatar for masijade
0
309
Member Avatar for z00t

[QUOTE=VernonDozier]if you want to display the buck object, you would do this: [code] System.out.println(buck.toString()); [/code][/QUOTE] Actually, it is unnecessary to call toString in a print statement. The print statements (print and println, not sure about printf, though, I should probably look into that) as those methods automatically use String.valueOf(argument), which, …

Member Avatar for z00t
0
4K
Member Avatar for senthilamp4

first you want \. not . second you don't need capture group parens around the parens third, what you are missing is the replacement string, which would simply be - and the first capture group, of course (since there should only be one capture group).

Member Avatar for senthilamp4
0
98
Member Avatar for boifang

While needs a boolean. [code]while((ch = f.read()) != -1)[/code] Now, you look at the API docs and/or the Java IO Tutorials and tell me what that line is now doing and how it is different from yours. Edit: And format your code!

Member Avatar for masijade
0
133
Member Avatar for Phatsimo Mosiam

First of all, properly format your code. How do you expect anyone to read that? Not to mention that that what you have will not compile, at all, since this [code]{ NIIT Developing Object Based Applications in Java Assignment A.9 [/code] is definately invalid code.

Member Avatar for masijade
0
64
Member Avatar for haribasker

Creaate class that extends JPanel and override the paintComponent method to draw the image. Edit: Of course, it would help to know exactly what the problem is that you're having with it.

Member Avatar for masijade
0
270
Member Avatar for fugmag

Do [i]not[/i] cobble together SQL statements like this. See the API docs and the JDBC tutorials for PreparedStatement.

Member Avatar for masijade
0
221
Member Avatar for haribasker

Uhm, setBackground(Color)? Don't forget to call setOpaque(true) on most components, however.

Member Avatar for masijade
0
8K

The End.