4,084 Posted Topics
Re: > less than a day to understand and learn evrything there is to know about arrays no, you don't. no teacher would ask you this, since noone can get all of that within a day. the basics, sure, but not everything. there are advanced things to think of as well. … | |
Re: add an actionlistener to p, and within your actionperform method, check what the source of the event is. | |
Re: maybe understanding a HashMap can help you out a bit, take a look at [this](http://docs.oracle.com/javase/tutorial/collections/interfaces/map.html) and [this](http://stackoverflow.com/questions/6493605/how-does-java-hashmap-work) | |
Re: what is it you're having trouble with? it's pretty well explained. | |
Re: ehm .. yeah, you have a record in your DB. do you have a record with that customerID? add a print statement in your findCustomer method, just to print your customerID, so you can verify it is what you think it is. | |
Re: video tutorials (in my experience) are a bad way to go. I don't even bother anymore counting the times someone came to me like: "hey, I followed this video tutorial, but I don't feel like I have a total grasp yet, can you explain it a bit further?" so, first … | |
i'm a bit wondering about the reliability of the endorsement system. for instance: I have been given two endorsements for my participation in (and knowledge of) the C++ forum. not that I'm complaining, but I don't really know C++ all that well, and have never actually posted in that forum … | |
Re: have you tried keeping the other thread (the song) to be blocked while your progressbar is running? | |
Re: did you remove all those semicolons? can you be a bit more specific? what is the value of type, and what is the output printed? | |
Re: so, the title has to be the name of the class the form is in? well, you can find the name through the native class Class, there are some methods in there to retrieve the name in several formats just check how you need it and implement it. http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html if … | |
![]() | Re: if I look at [this link](http://www.java-forums.org/advanced-java/63056-problem-jmf.html), I guess you're not the only person having this problem. personally, I've hardly used JFM, but I have written an mp3 player in Java (once). Are you only trying to play mp3 files? Is JMF a pre-requisite or rather an option? if so, try … |
Re: that's because you use setText instead of append | |
Re: so, just to clear the doubts raised earlier: what language do you want this in? Java? if so, Java has methods, not procedures. and what exactly do you want in methods(procedures)? | |
Re: what exactly are you trying to do? my guess: you're writing one application which needs two user interfaces, a Swing UI and a jsp UI. | |
Re: while (true) there is your infinite loop, but trust me, an infinite loop is the last thing you want in running code. | |
Re: might also be a problem in your tomcat configuration. but this isn't really the best place to post questions about jsp applications, I think you'll have more success over [here](http://www.daniweb.com/web-development/jsp/24). | |
Re: which has nothing to do with the IDE, just with the code you write. Since you are using NetBeans, if you actually want to learn about Swing code, I would strongly recommend NOT to use NetBeans' WYSIWYG editor. | |
Re: an int would be a logical choice if you were looking for an index, for instance, String[] myArray = fillArray(); // let's assume this exists String searchWord = "search"; int found = -1; for ( int i = 0; i < myArray.length; i++){ if ( myArray[i].equals(searchWord)){ found = i; break; … | |
Re: so .... > this is a homework assignment. iv made the code do what its supposed to do, and it works perfectly. > The only problem im facing now is to model the code structure according to the given API. when i try to do so, i go into null … | |
Re: by writing the code like that? but why not just extend TimesTable and override the doEnd method, if that is the only method that is supposed to do something different? | |
Re: be more clear about what format you are trying to play. if it's just a .wav file, you don't need any additional libraries, but, if you want (for instance) to play .mp3 files, you should note that they are not supported by core Java. in order to play those, you'll … | |
Re: that can indeed be a sollution if, and only, if you know that 0 can never be a valid outcome of the method, but in this method, I can't see any reason why any return value would be invalid (depending on the numbers you enter) another sollution would be to … | |
Re: because the question is to perform the action when entered while the button is selected. | |
Re: there are tons of reasons why we can't/shouldn't do that. but there is a sticky thread on top of this forum with ideas just for that. have you checked it out? | |
Re: this isn't really the best place to ask questions about this. maybe the web development forum is a more suitable place. | |
Re: just google "Java roll dice" and you'll find tons and tons of examples of how to find a random number in the reach [1-6], I'm pretty sure you'll be able to adapt it to code that returns a random number in the reach of [1-3] | |
Re: http://docs.oracle.com/javase/7/docs/api/java/io/PrintStream.html check the explanation on the printf methods. | |
Re: take a close look at this line in your code scanner2.useDelimiter("[ ]*(,)[ ]*"); or, you could read the line completely (what you're doing with nextLine) and use the split method of the String class. | |
Re: your code is filled with errors, and a lot more then you imagine. just saying "it shows an error" doesn't say anything. what error does it show? also: don't use the '==' operators to compare Strings, unless you want your application to work in a way you don't expect/want it … | |
Re: behold, [the answer](http://bit.ly/X66wF9) to your question. | |
Re: why do you have this: : here in your code? public Name(String LastName, String FirstName) { lastName = LastName; firstName =FirstName; }; | |
Re: since you need to use print statements, this statement might be a bit more help then I intend to give: System.out.println("NO! Do your own Homework!!"); | |
Re: and you think we have access to your code? it would appear that the application has trouble "creating the bean with name 'urlMapping'" which you defined in your dispatcher-servlet.xml file, but that's as good as I'll be able to say. | |
Re: an easier implementation would be to make a: isMale() method, that returns true if the gender == m or M, false otherwise, that way you don't have to validate the input, neither. | |
Re: or, the 'enhanced' for: for ( Type elementName: arrayOrCollectionName){ } but so far, what have you found online, in your textbooks, ... this is very basic stuff, finding out about it should be extremely easy for anyone. | |
Re: the split method in the String class can help there. | |
Re: ehm ... you may have given a wrong url. there may be problems with your internet connection, .... but without giving a bit more information, it's pretty difficult to give a more profound answer. | |
Re: a simple library system. an "assignment generator" could also be a nice idea. | |
Re: meenal9: that is the very WORST advice ever. allowing your main method to throw an exception might look smart, but if you worked for me, that would mean: bye-bye. the main method is the very last place where you can actually catch the exceptions thrown and add some decent exception … | |
Re: help you with what function? the iteration? while ( true ){ // your code String readAgain = scanner.next(); if ( readAgain.equals("No")) break; // exit loop } | |
Re: if ( char from array 1 at index i == char from array 2 at index i ) print (not println) char from array 1 else print - is that what you mean? | |
| |
Re: > You wished you can teach? What are you talking about, you give me a good lesson almost every time I ask a question, so you are technically always a teacher :). well, you have to take into account that being a "teacher" isn't always the same as being a … | |
Re: AncientDragon: how can youtube have a license to those videos? it's the user who upload them, that control what video's they put online, not youtube. they'll only delete the video's when a complaint has been filed and they feel urged to follow up on it. <Michael> > Technically, downloading anything … | |
Re: does the file exist? run a check on your f variable. | |
Re: your question makes no sense. first of all, there are no global variables in Java. I assume you are talking about instance variables. also: your code doesn't make sense. In your constructor, you assign the value name to a non-existing variable holdingName. why? because that's the name of the parameter … | |
Re: sort them, based on the value of occurences, and only print the first ten, using a normal for or a while loop. | |
Re: help you with what project? I don't see an analysis, nor code, I just see a very, VERY vague title for your project. you didn't even add the actual assignment. Community rules on this forum dictate: * Do post in full-sentence English * Do use clear and relevant titles for … | |
Re: re-initialized? don't see that happening, maybe your logic sets values in a way you didn't expect or anticipate. the iteration of which loop do you mean? |
The End.