1,678 Posted Topics

Member Avatar for solomon_13000

It doesn't make it any different. The 'abstract' is implied. You can find the same information in the Java Tutorials somewhere (I remember reading it, but don't remember where), but this question was also already asked [URL="http://www.velocityreviews.com/forums/t298061-abstract-interface-in-java.html"]here[/URL].

Member Avatar for BestJewSinceJC
0
95
Member Avatar for ceyesuma

Are those JTextFields? If so, setText is the right method. [url]http://java.sun.com/docs/books/tutorial/uiswing/components/textfield.html[/url] Are you sure your text fields are properly initialized and added to the panel? Can you post a bit more code showing where this is done? And have you taken similar steps in your code as I have in …

Member Avatar for BestJewSinceJC
0
183
Member Avatar for JanieRae

Here is a for loop that can iterate over an array [CODE]for (int i = 0; i < array.length; i++){ //Now add your code in here to access your array etc }[/CODE]

Member Avatar for BestJewSinceJC
0
119
Member Avatar for kvass

[QUOTE=kvass;1134734] My confusion: Isn't one of them wrong??? If intOb calls compareTo() correctly on ob which is of type object, shouldn't the printBirdCall() be called correctly on bird, since it is an instance of Parrot? Is there a distinction to be made between these 2 cases??? Help!!![/QUOTE] No. Look at …

Member Avatar for kvass
0
234
Member Avatar for darkagn

[QUOTE=jwenting;1133237]Best solution IMO: scrap both rep and voting and give mods more power to remove useless and factually incorrect posts (which are the main reason people (should) vote posts down anyway) and posts in violation of the TOS (which apparently can't be removed now for some reason).[/QUOTE] Disagreed. The mods …

Member Avatar for Ancient Dragon
0
469
Member Avatar for beGinneR24

Why would you read in the user's choice into a variable called "app" but then check to see if a variable called "application" is greater than 20. There is your first mistake right there. Besides, you already know that application = 0 since you just declared it and never changed …

Member Avatar for beGinneR24
0
100
Member Avatar for jorgelex008

Then you will need a [URL="http://java.sun.com/docs/books/tutorial/uiswing/events/windowlistener.html"]WindowListener [/URL]on the secondary JFrame. In particular, you will need to declare your secondary JFrame's class as "implements WindowListener" and then you will need to implement each of the methods found [URL="http://java.sun.com/j2se/1.4.2/docs/api/java/awt/event/WindowListener.html"]here[/URL]. Look at the windowClosed() method in particular; since it gets called when your …

Member Avatar for jorgelex008
0
169
Member Avatar for java_programmer

Jwenting said probably said that because googling "vector arraylist java" returns thousands of helpful results to the exact question the OP asked. Why reiterate a question that has been answered so many times that can be found so easily? And you upping this thread was also unnecessary. Look at the …

Member Avatar for BestJewSinceJC
0
121
Member Avatar for Fulladder

Java Addict is absolutely correct. From online (would credit source, closed the tab accidentally): "Since Strings are objects, the equals(Object) method will return true if two Strings have the same objects. The == operator will only be true if two String references point to the same underlying String object. Hence …

Member Avatar for BestJewSinceJC
0
140
Member Avatar for sedai77

Start like this: [CODE]Student[] student = new Student[SIZE];[/CODE] After you design a Student class similar to the Person class described above. Your teacher might want some sort of hierarchy, such as Student extending Person. Read about inheritance. Read about classes. And read about arrays. Feel free to ask about those …

Member Avatar for BestJewSinceJC
0
136
Member Avatar for lrh9

[QUOTE=ardav;1114429][OFF_TOPIC] I have a point, but I'd also like to **** off gung-ho pillocks that say things like "we're at war with the Muslims". You probably don't like my post, but I don't like people banging on about their right to invade other countries and then blast 'em with Bible …

Member Avatar for jwenting
1
768
Member Avatar for hirafaryal

Search the forum first. I'm pretty sure whether its for a neural network or anything else is immaterial. What you want to know is how to convert an image to a vector, period. Am I right?

Member Avatar for dusktreader
0
91
Member Avatar for iarkey

What bugs did it solve? Did anything else in your program change? Post your updated code. Your program might not be working even though you think it is. Simply taking out or fixing one thing can cause another thing to break. Errors can cover other errors, making them look correct. …

Member Avatar for iarkey
0
149
Member Avatar for XodoX

[QUOTE=XodoX;1130739] The search option is obviously still missing. The way it is not, is that ok? I have no idea how to implement the search though. I don't know how to do the search. Help would be relly appreciated.[/QUOTE] Create an 'Automobile' class. Your ArrayList should be filled with Automobiles. …

Member Avatar for BestJewSinceJC
0
627
Member Avatar for chixm8_49

If your "start" Node is null, then your method will never run like you want it to. Try checking to see if start is null simply by doing this: [CODE]if (start == null) System.out.println("start node null error");[/CODE] Furthermore, as far as I can tell, this loop has no effect since …

Member Avatar for BestJewSinceJC
0
102
Member Avatar for SmackFN22

[CODE]if(tempString.equals(sBuilder))[/CODE] That line will not work since sBuilder is a String, while tempString is a StringBuilder. They are different types of objects. The equals() method is meant to test if two objects of the [I]same type[/I] (i.e. two Strings, not one String and one StringBuilder) are equal. I imagine you …

Member Avatar for SmackFN22
0
107
Member Avatar for Cort3z

If you're using Scanner's next() method to read in the String, it is probably killing your whitespace. [url]http://java.sun.com/j2se/1.5.0/docs/api/java/util/Scanner.html#next%28%29[/url] . Keep in mind that the default delimiter pattern matches whitespace, so your 'tokens' that it refers to in the method documentation is preceded and followed by whitespace. Do you mind posting …

Member Avatar for masijade
0
171
Member Avatar for Mushy-pea

[QUOTE=Ene Uran;1120287]The government also has the power to print money. lots of it! A measly 14 trillion, ha, just a drop in the bucket![/QUOTE] But when the government abuses that power, the money becomes worthless.

Member Avatar for jbennet
0
288
Member Avatar for Narue

adatapost When he first joined the site he seemed different in some ways (one being that his English wasn't as good, or didn't seem as good to me). However, he has since become a mod in the Java forum (and perhaps other forums as well?) and has definitely earned my …

Member Avatar for jonsca
2
513
Member Avatar for nolimit966

1. Number is a class name. If you want to declare a 'Number' variable, you have to do it like this: [CODE] //Make sure you use a valid constructor Number numberName = new Number(); //An alternative way Number anotherNum = null; //Somewhere later in the code, before you use the …

Member Avatar for tjsail
0
746
Member Avatar for sujithy15
Re: ide

[QUOTE=musthafa.aj;1126743]i request daniweb admin need to more clarify about what kind of question need to be asked? list of exception that should not be in thread... people who are not aware of rules and regulation maybe a newbie asking some questions that violate our rules should be warned first time …

Member Avatar for sujithy15
0
186
Member Avatar for mrnutty

TBH, if anyone asked me to write a Binary Search Algorithm on a whiteboard, I would be terrified. I'd need a few minutes just to sit and think about what to do, and I can't do that with someone else waiting for me to do it. Also, Narue, I have …

Member Avatar for vaultdweller123
0
1K
Member Avatar for wmsigler
Member Avatar for BestJewSinceJC
0
111
Member Avatar for zrjamcrz

Haha. No details? If you want to impress someone you'll have to program something that is either extremely cool (which would involve coming up with your own idea) or program something that is above your skill level. I'd program something that isn't that difficult such as the client/server game that …

Member Avatar for verruckt24
0
165
Member Avatar for ainct

Is that maybe because Unix commands don't execute when you aren't in a Unix environment.. ?

Member Avatar for ainct
0
153
Member Avatar for endsamsara

I have to disagree with jwenting here. If you are already using an ArrayList then why use an additional data type that doesn't even help you in any way? Do the following: 1. Write a for loop that iterates over your entire array. 2. For each element in the array, …

Member Avatar for Ezzaral
0
279
Member Avatar for fardoonmuhafiz

Yeah, obviously it is just how Java was written. But the reason for that was, in no small part, based on C++, where multiple inheritance can get very messy. I don't remember the issues very well (as I'm not a cpp programmer), but one issue is that naming of methods …

Member Avatar for verruckt24
-3
147
Member Avatar for mahela007

[url]http://en.wikipedia.org/wiki/Process_%28computing%29[/url] Not useful?

Member Avatar for kizmarbie
0
113
Member Avatar for thekashyap

You're much better off either asking a more code specific question here or relying on the people you work with rather than a vague question like the one you provided. From the fact that you said 'extension point' I'm assuming you are working in Eclipse RCP, since I have worked …

Member Avatar for ~s.o.s~
0
110
Member Avatar for chern4ever

What is the error? Give us the error message, usually it includes line numbers and other useful information.

Member Avatar for masijade
1
104
Member Avatar for vmanes

[QUOTE=Narue;1114310][B]>A word I wouldn't expect to see in a programming text >"gauche"[/B] Why not?[/QUOTE] Probably because it is an extremely unusual word, it is not the best word to describe the situation, and most of the readers of any programming book would not have ever seen or heard the word …

Member Avatar for ddanbe
1
334
Member Avatar for Prachi Doshi

What don't you understand about those topics that Java Sun's articles can't answer? I'm not going to type you a paper about abstract classes and neither is anyone here, since the information is readily available. Ask a specific question.

Member Avatar for Prachi Doshi
0
157
Member Avatar for Salem

[QUOTE=Ene Uran;1110935]The folks at the NSA will pick your super secret password in less than a second. So, pick something simple you can easily type and remember in the hope that it is safe from the boss or your underage sister.[/QUOTE] Really, how? Because the NSA might have faster computers …

Member Avatar for PedroStephano
0
707
Member Avatar for GekkoAB

[QUOTE=orcboyx;537287]Aren't there some potential repercussions from using these programs?[/QUOTE] If the program is freeware, than the only potential repercussion is that it might be illegal according to Windows to bypass their OS to change your password. But you don't need to worry about that. Nobody cares about changing your own …

Member Avatar for reluwan
0
743
Member Avatar for beforetheyknew

[QUOTE=KirkPatrick;1122361]You will however need the [I]@Override [/I]though. [/QUOTE] You do not [I]need[/I] the @Override. All you need to do to override the equals method is provide this method header (and an implementation) in your class: [CODE]public boolean equals(Object obj){ //some implementation goes here }[/CODE] Using the @Override tag is helpful, …

Member Avatar for ~s.o.s~
0
129
Member Avatar for selenask

Complexity should be O(n). You only need to scan through the entire String once. If you get to a point where your current sequence it is no longer in sorter order, start your current counter over, moving to the next character. Then repeat.

Member Avatar for BestJewSinceJC
0
637
Member Avatar for rakshavprabhu

What kind of Objects are in your list? Are they Strings? if so, contains should work fine, if they are custom made Objects, you will need to override the equals() method of the Object class. You can look into how to do this properly on google; it is fairly simple.

Member Avatar for rakshavprabhu
0
111
Member Avatar for aianne

[QUOTE=zortec;1120866]That is odd. Back when I was programming in college, you were not allowed to write any code until the flowcharts and pseudo-code were done. They also had to be approved by the teacher.[/QUOTE] No shit. Just like you don't design the plumbing after the house has been built. Or …

Member Avatar for BestJewSinceJC
0
187
Member Avatar for ontherocks

You could read each line of the file into an array. Since you would know that the current line is at an index less than the lines after it, you could use that knowledge to compare characters without a problem.

Member Avatar for BestJewSinceJC
0
1K
Member Avatar for CheekyB

You aren't declaring your while loop properly because of the ';' For examples of how to correctly use while loops, use google, but for any type of loop, you need to put brackets around what you want to happen. Quick example for you [CODE] //acceptable while(someVariable == false){ //do stuff …

Member Avatar for BestJewSinceJC
0
82
Member Avatar for OffbeatPatriot

JavaAddict: Good suggestions but for the one suggestion, it shouldn't matter if he implemented equals() since he is using the removeAll method. Right? OP: If none of JavaAddicts solutions work, please post all of your code and I will run it and play with it and help you figure out …

Member Avatar for OffbeatPatriot
0
136
Member Avatar for lightninghockey

Well, where is your code to find the quadrant? You mentioned that you already wrote it, but you did not post it. Personally, I would just drop that piece of code into the Test2 class you created (or whatever your main class is). You could also put it in your …

Member Avatar for lightninghockey
0
1K
Member Avatar for sunilkuntal

Not to dissuade you if this is a learning experience, but don't expect a perfect product with JMF. I wrote a simple media player and the audio did not play back as well as I had hoped. And certainly not as well as mainstream media players, even for the same …

Member Avatar for BestJewSinceJC
0
57
Member Avatar for PuQimX
Member Avatar for BestJewSinceJC
0
142
Member Avatar for TGeorge824

Unless you enjoy proving things you're probably going to hate mathematical proofs, so take linear algebra. I'm just being a realist. You can learn a lot in either class, and Rashakil's argument for taking the proofs class can be applied to anything. Yeah, you can learn linear algebra on your …

Member Avatar for lycry
0
191
Member Avatar for Stefano Mtangoo

To make the components fit the entire screen, you could programmatically intercept the user's 'maximize' action (using WindowListener). Then, when the user hits maximize, you can [URL="http://www.exampledepot.com/egs/java.awt/screen_ScreenSize.html"] use this technique[/URL] to get the screen size. Then set the size on the JFrame using setSize to the size that you just …

Member Avatar for Stefano Mtangoo
0
89
Member Avatar for Rmj001

You can't use spaces. If you want to name your variable total of cars you simply cannot do that, so use total_of_cars instead. So yes... using invalid syntax is a sure way to cause errors. Also, the number of errors you get does not necessarily matter. In other words, you …

Member Avatar for Rmj001
0
341
Member Avatar for Bemani_lover

In reference to what Vernon just said, check out [URL="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Float.html#parseFloat%28java.lang.String%29"]this link[/URL]. It is [I]very[/I] important to learn how to read and interpret the javadoc documentation. And when I think of dynamic memory allocation, I think of malloc and calloc in C. . in Java, all you need to do is …

Member Avatar for peter_budo
0
144
Member Avatar for akonful

[QUOTE=akonful;1118211]OK, how would I do this[/QUOTE] read this. [url]http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Character.html#isDigit%28char%29[/url]

Member Avatar for BestJewSinceJC
0
100
Member Avatar for mseck

No, because you hard-coded the values in, you never prompted the user. But you knew that. So what are you asking .. ?

Member Avatar for staneja
0
103

The End.