2,443 Posted Topics

Member Avatar for sawant_nitesh

[url=http://java.sun.com/docs/books/tutorial/reflect/index.html]Reflection[/url]

Member Avatar for masijade
0
114
Member Avatar for ImSorry123
Member Avatar for koolhoney07

An int is 4 bytes which is 32 bits (31 of which is value and the 32nd is a pos/neg toggle). A long is 8 bytes (63 bits data and 1 pos/neg toggle) so use long and parse that String to a long using Long.parseLong(string). If a long is also …

Member Avatar for verruckt24
0
2K
Member Avatar for Frani

[code=java] while (room.length() == 0) { System.out.println("Error: This field cannot be empty"); System.out.println("Enter the name of the lab this computer is located: \t"); } // this } closes the while room = scan.nextLine(); } // so this brace closes the method [/code] I am fairly certain your "first" '}' commented …

Member Avatar for Frani
0
130
Member Avatar for prashant1111
Member Avatar for Karas87

In Java regex, there is no reason to escape "/", and, if you [i]do[/i] need to escape something, then you also need to escape the escape as the escape character also escapes characters in String, in general (i.e. "\\" every place you need a "\").

Member Avatar for Karas87
0
145
Member Avatar for AirmanTheGreat

One, remove that ";" at the end of the for loop declaration. That ";" [i]ends[/i] the for loop. Also, near the end of the block that is [i]suppossed[/i] to [i]be[/i] the for loop, remove that [inlinecode]guesses++;[/inlinecode]. Using that statement you would be incrementing "guesses" by two through every iteration of …

Member Avatar for AirmanTheGreat
0
101
Member Avatar for hell_tej

`"jdbc:odbc:<DB>"` not `"jdbcdbc:<DB>"` You also need to configure your DSN (Google for that or ask at a Microsoft forum), and adding the Microsoft Access Driver does no good. Netbeans/Java is *not* using that, it is an ODBC Driver. Java is using the JDBC-ODBC Bridge which bridges to ODBC Drivers. Now, …

Member Avatar for hell_tej
0
202
Member Avatar for mnvsriram

Different processing speeds? I mean, really, the question means about nothing. What are the relative Processor Speeds, the relative network interface throughput, the relative hardware threading capability, the relative memory speed, the relative diskspeed, etc, etc, etc, etc, etc, (I think you, maybe, get the point).

Member Avatar for masijade
0
93
Member Avatar for srs_grp

That is a Sybase question. [url]www.sybase.com/support/community-forums[/url]

Member Avatar for masijade
0
102
Member Avatar for rhesus303

man test [ ] is a "shorthand"/"shell-builtin" for the command test. And, for reference, file-handle 0 is either standard out or standard in. I forget which and it has been years since I've had to worry about it.

Member Avatar for Fest3er
0
77
Member Avatar for PhiberOptik

I don't believe so (although you can try with HTML marked text as with JLabel, but I don't think it works for a textarea). Check out JEditorPane.

Member Avatar for JamesCherrill
0
66
Member Avatar for himanjim

This is just so wrong on so many different levels. First of all, neither a servlet, nor a JSP has any business, what-so-ever even attempting to open a socket, much less a serversocket. You do realise that a JSP/Servlet is meant to be run mulitple times, right? And a serversocket …

Member Avatar for hardikjobalia
0
741
Member Avatar for rayda

Initialise your high/low variables like this [code] int highest = Integer.MIN_VALUE; int lowest = Integer.MAX_VALUE; [/code] and you can't go wrong. ;-)

Member Avatar for javaAddict
0
99
Member Avatar for curtissumpter

I have no idea what it is you want. If it is that you want to develop Servlets and JSP's then you have what you need.

Member Avatar for peter_budo
0
70
Member Avatar for weblover

It [i]is[/i] displaying every row but [code] t1.setBounds(20,20,200,200); [/code] when you put [i]every[/i] label in exactly the same place you only see the last one. I assume you are using the "so-called" null layout? If so, why? That is, usually, the [i]worst[/i] thing you can do to your GUI. Don't …

Member Avatar for weblover
0
99
Member Avatar for mona515

When properly formatted [code] public double getTotal() { if (s) { return calcSummerCost(); { if (!s) { return calcWinterCost(); } } } [/code] Do you see your problem? I have the feeling that you used the wrong brace after [inlinecode]return calcSummerCost();[/inlinecode]

Member Avatar for verruckt24
0
230
Member Avatar for heysebas

Seeing the code (or at least parts of it) might help. But, if there were any "problem" (and there probably is), then you would get an error message, unless of you're catching the Exception and ignoring it.

Member Avatar for masijade
0
92
Member Avatar for ravikiran032

It prints that message because it is catching an exception and that is what you are [i]telling[/i] it to print. Add a stacktrace to that catch block and try again, so that you at least know [i]what[/i] is going wrong.

Member Avatar for masijade
0
5K
Member Avatar for rainny
Member Avatar for Taniotoshi
0
124
Member Avatar for radar2009

[QUOTE=budz;813622]wud be nice <3[/QUOTE] No it wouldn't. You might [i]think[/i] would be, but how would that help you on your next assignment, which is meant to build on what you learned in this assignment? If someone does it for you, you haven't [i]learned[/i] anything (and don't give me the bs …

Member Avatar for stultuske
0
192
Member Avatar for PhiberOptik

Well, if that's your [i]real[/i] code, I can believe it's not "sending any errors", as you're ignoring them. On the other hand, why don't you read the manifest file to get the Main class name, then start a thread, create a classloader, and call the main method from that main …

Member Avatar for masijade
0
355
Member Avatar for thijo

Well, where the heck is kMeansPoint defined? Not in that code. Also, if you are going to ask on help with an error, post the [i]entire[/i] error and give at least some indication of [i]where[/i] in the code that error takes place.

Member Avatar for verruckt24
0
115
Member Avatar for k2k
Member Avatar for erdomester

Create a toString method in that HeightStats close to control how it "prints".

Member Avatar for erdomester
1
154
Member Avatar for trueinam

And? Have you tried using the [inlinecode]-Xlint:unchecked[/inlinecode] option to javac, yet?

Member Avatar for stephen84s
0
111
Member Avatar for mashimaro

Not that it's [i]really[/i] necessary (as there is a package dedicated to LDAP in the Standard JDK [url]http://java.sun.com/javase/6/docs/api/javax/naming/ldap/package-frame.html[/url] ), but it [i]does[/i] make things easier. ;-)

Member Avatar for mashimaro
0
138
Member Avatar for gpittingale
Member Avatar for shahab.burki

Of course you can declare char arrays, but be aware that each "String" [i]is[/i] a char array, so you would need a two dimensional array to hold char arrays equivalent to an array of Strings.

Member Avatar for stultuske
0
145
Member Avatar for gpittingale
Member Avatar for staneja

First of, it is [i]Swing[/i], not Swings. Second, you probably have not updated the container holding the table. Call validate(), and/or repaint() on the container. Third, there is no reason to create a whole new table. Create a new TableModel and assign that TableModel to the existing table. Then call …

Member Avatar for masijade
0
79
Member Avatar for curtissumpter
Member Avatar for ajithraj

As soon as an object is no longer referenced it will be garbage collected (at the next GC run). If the only reference to that list was in that method, then yes, that list will be eligable to be GCed as soon as the method returns. Not that that method …

Member Avatar for ajithraj
0
168
Member Avatar for k2k

[QUOTE=k2k;801527]hi, i just have many questions regarding abstract class, please briefly explain if you may. thanks. 1. what is the difference between declaring public abstract class and abstract class ? [/quote] Well, what's the difference between declaring public class and class? [quote] 2. should abstract class have a constructor? i …

Member Avatar for masijade
0
145
Member Avatar for seemant gupta

[url]http://java.sun.com/javase/6/docs/api/java/util/Scanner.html[/url]

Member Avatar for verruckt24
0
75
Member Avatar for de boer

Well, using my powers of telepathy and empathy, I will tell you that character 6 on line 225 of your second class should be c.

Member Avatar for javaAddict
0
819
Member Avatar for seemant gupta
Member Avatar for zeiken
Member Avatar for spec80

Because "abstract1" does not declare that method, it cannot be called on an instance that is referenced as an abstract1 instance. Either you have to cast or declare it as "child" or you have to declare an abstract "child(side)" method in abstract1.

Member Avatar for masijade
0
123
Member Avatar for wkid87
Member Avatar for masijade
0
53
Member Avatar for arseniew
Member Avatar for aparna balkwade

Each system command gets it's own "shell" (if you want to call it such, it's not really a complete shell, but it is an executiuon environment). So, the cd is working, but it's happening within that subshell, which means the shell in which the perl script itself is running, remains …

Member Avatar for mitchems
0
1K
Member Avatar for javac
Member Avatar for rapture

This part of the code [code] class calculateButtonHandler implements ActionListener { public static calculateButtonHandler chandler; [/code] is declaring an inner class, which cannot have static types. Declare this class [i]outside[/i] of the class definition for OfficeAreaCalculator. P.S. Not that I think that that is the only problem with your code, …

Member Avatar for rapture
0
119
Member Avatar for stephenpeter
Member Avatar for masijade

[QUOTE=newtonorina][QUOTE=masijade][QUOTE=newtonorina]Am new in the programming sector. I have a task that requiires me to join a java interface to mysql but I don't know the code to do that. Can you please help.[/QUOTE] [url]http://dev.mysql.com/doc/refman/6.0/en/connector-j.html[/url] Next time start a thread.[/QUOTE] I just wanted a small program in Java for eaxample that …

0
74
Member Avatar for chaithanya_86
Member Avatar for mona515

Okay? So what [i]exactly[/i] are you having problems with? Please refer to the forum "rules". We are not going to "finish" this for you.

Member Avatar for javaAddict
0
75
Member Avatar for funlovingashish

What does a JSP have to do with Screen Resolution? It might, with a few JNI libraries, be possible to change the screen resolution on the server (although I have no idea why you would want to, or what it might bring you), but not the client (which is, seemingly, …

Member Avatar for masijade
0
99
Member Avatar for britto

The End.