4,084 Posted Topics
Re: [QUOTE=edensigauke;1541229]or you can add 1 to the value of count in your loop[/QUOTE] what good would that do? he would still be trying to fill a non-existing spot in an array. I think what you want is more something like: [Code=Java] ... int [] numbers = new int[count]; for(int ii … | |
Re: edensigauke: please check the dates. you are replying to a post that is a year old. | |
Re: ehm ... I'm not really sure what your question is. is that your working code you need/want to improve? do you need to write additional methods/functionalities? ... ? | |
Re: and for a String, you could use String newString = String.valueOf(a); | |
Re: for further reference: could you poste more usefull information? yes, you get the notice of an arrayOutOfBoundsException. but you also are told on which line of your code that occurs (just an example) showing us the relevant code 'll do, you don't always need to show the entire code | |
Re: this has nothing to do with not being able to produce output: the file can't run since it has no main method, which would be the entry point for the program. | |
Re: well, J2EE is a bit 'out of date'. since (not sure which version) it's just called JEE. what are you lookint into learning exactly? I doubt anyone will ever know "complete JEE" since JEE is more or less a 'collection of frameworks', while you usually only need to know one … | |
Re: this is not a java question, this is your assignment. please read the community rules: we are not a "Developers-for-Hire" team, nor are we here to help you cheat. show us your code and tell us where you are stuck, that we will help you with. | |
Re: also, based on this (and other threads I've seen you start), using google from time to time wouldn't hurt you. here's a [link](http://docs.oracle.com/javase/tutorial/deployment/applet/index.html) to the official applet tutorials. basically put: an applet is an application that runs in a web-browser. | |
Re: when in doubt, google :) [read file line by line](http://stackoverflow.com/questions/5868369/how-to-read-a-large-text-file-line-by-line-in-java) | |
Re: learn how to use that other fine invention: google. or read your textbook. or perhaps your course notes. you may want to go over the sticky thread on top of the Java forum. if you can't locate it, [here](http://www.daniweb.com/software-development/java/threads/99132/starting-java-java-tutorials-resources-faq) is a direct link to it. | |
Re: well, the generation of the late seventies were wrong. they claimed 'Grease' was the word. when talking about interfaces, there are two words, but 'Grease' is neither of them. the first one being 'Contract': an interface is a fixed contract which applies to any class that implements said interface. every … | |
Re: "You look gorgeous..." (mankind being lied to by mothers since the first mother, I believe :) ) "You won't feel a thing..." (dentists tricking kids since the profession came to be.) | |
Re: by Vector, I'm pretty sure he means : Vector. when you iterate over your array, extract the elements one by one and add those to the vector. | |
Re: notepad, command prompt, a jdk and your course notes. | |
Re: if you are looking for good "Graduation scripts out there", that kind of makes me think you're trying to cheat you're way through, which is what I hope you're not. so far, what you described is about five to ten minutes work, and sure, there are tons of jquery libraries … ![]() | |
Re: Since not all the links have been updated yet: here's a good one, too: http://docs.oracle.com/javase/tutorial/ | |
Re: first thing to check: is your javascript enabled in your browser? that's one big problem when using client side validation: the user can disable it. | |
Re: > it would fail to read the data and run to the Exception, may i please have help on it this doesn't really give us much to go on.... some good advice on Exception handling: if your code can throw (for instance) a NumberFormatException, and you are aware of this, … | |
Re: bguild: the solution provided by radhakrishna.p does exactly what the OP is asking for, no need to look for "deeper truths" here. | |
Re: I've tried to copying the code you provided in Eclipse, to check for the linenumbers, but either you did not give us your most recent code, or you did not post all the exceptions you're getting. you also should know, we don't have all the classes you do, so that … | |
Re: are you sure it's an error? I see that you print your array, instead of just an element of it, that might be your problem. | |
Re: for getItem, get the item at the index of i, so, the index in list. getTotal should be returntype int, and return the value of count. but I think you're mistaken with what is and should be static. count should be static, item and ID shouldn't be. | |
Re: http://www.springsource.org there are also some very good books around: Spring in action (3rd edition) Spring in practice is about to be released . | |
Re: depends ... do you want to use java code? if you are using javacode in snippets: <% String b = "a small snippet"; %> in your jsp's, then my recommendation: YES, unless you'll only be working with small, personal pages that won't need to be very secure, nor easy to … | |
Re: depends on what "sound". what kind of file are we talking about? .midi? .wav? .mp3? the first few can be played with using nothing but core java, but if you want (for instance) to play .mp3 files you'll need an additional library to get it to work. | |
Re: without any code, that is very difficult to see. but I made an mp3 player with JLayer once, and it's doable. but what do you mean, WindowListener? what do you need a WindowListener for? why don't you use an ActionListener? | |
Re: since you forgot to mention what the problem with it is, in which way should that "sterr" go? | |
Re: what are you working in? html? jsp? jsp? php? does it have to be functional or just "look" like that? | |
Re: since it's supposed to be for the developer, cookies are out of the question. what you could do, is add a table in your db with one column, which has one row, your counter. on each time you open a session on the page, increment that value with one. might … | |
Re: you may want to work on your indentation as well, it'll make it a lot easier to actually read that code. if this is code your teacher gave you, then most likely, what you are asking us to do, is your homework. you should find all the information you need … | |
Re: JavaDuke: this thread is 6 years old, there's no use in reviving it every year. | |
Re: the problem with most applications: if it's "simple", it's usually .. well, lousy. a few issues with this code: if you want to add, or correct a definition of a word, you have to recompile your code. you could read both word and definition in from a .txt file, which … | |
Re: still wondering if anybody ever answered: "the rooster" when asked this question ..... | |
Re: if you are just beginning, I would advice a very simple text-editor and the command prompt, so you'll learn how to compile, package, run, ... your applications without an IDE hiding the steps you should take. so, just beginning, notepad++ is a nice way to go. when you're more familiar … | |
Re: I've got this feeling you may want to give a bit more information of what it is you are trying to do, and what it is you've already tried. | |
Re: it would be best that you either pick up a good textbook on java and go over the material, or look up online what you need to know to work with arrays: [This link](http://docs.oracle.com/javase/tutorial/java/nutsandbolts/arrays.html) right here 'll provide you with all you need. but, just to give you a quick … | |
Re: ehm... what? not sure what you want exactly, but why don't go for a .jar file? besides: "it should run the code"... what code? | |
Re: imho logical reasoning isn't something you learn from a book. an easy way would be to look into brainteasers and try solving them. for instance: one I got one time: you have a row of gnomes, some of them have red hats, some of them have blue hats (and no, … | |
Re: "calculate" an ip address? why would you want to calculate one? you mean you're trying something like [this](http://www.javaprogrammingforums.com/java-networking-tutorials/265-how-get-your-computer-name-ip-address.html)? | |
Re: why would you want to use those? if you use static it'll go look for either a missing returntype, or a missing methodname. let's say you could.. public class Person{ private String name; public static Person(String newName){ name = newName; } } just a few reasons why this is not … | |
Re: that is because you are comparing your Strings in a bad way. '==' will compare the values of primitives correctly, but for Objects (and String is an object) '==' will compare references, not equality of the value. use the .equals() or .equalsIgnoreCase() method instead. | |
Re: well ... you can start with looking into copyrights. just because the information is stored in an avi, a pdf or on a webpage, doesn't mean they don't apply. | |
Re: have to? no. there are several packages available to perform these tasks, of which apache's POI library is a very well known example, that is used in tons of applications world wide. there's also no need to provide entire code examples, since the documentation sections of the frameworks provide more … | |
Re: Tux: I think the reason for the deletion can be found in his edit-message: > EDIT: Nevermind, the problems existed outside of my program! Ignore! Guess he didn't feel like he has to share his code if there's no problem with it, or maybe he removed it so nobody would … | |
Re: yes. a JFrame is what you describe as a "Window". you'll need to have your Window class extend the JFrame class and configure and initialize it correctly. | |
Re: several ways: MS Access is quite easy, OpenOffice has an alternative, too. MySQL is a more professional, yet still free database. If you are intrested in a database written in Java, to implement in your project, you might want to look for Derby. Since this is for a school assignment, … | |
Re: tried throwing the exception if newb = 0? | |
Re: also: a good advice for a next thread. when you say "interface", a lot of us will misunderstand your question.if you are talking about a Swing interface, it is better to refer to a "user interface" or a "graphical user interface" |
The End.