4,084 Posted Topics
Re: this is like God 'before all times' saying: 'mankind ... I need the blueprint of that species'. you're being way to vague in your (lack of) description. when working on an analysis, don't think abstract, go as specific as possible, and leave no room for interpretation, that way you know … | |
Re: don't really see an action triggered by a (J)Button there. can you add a print in the catch statement? at this point, it is possible that you have a massive error message, but since you don't print it, you're just not aware of it. | |
Re: java.lang.ArrayIndexOutOfBoundsException: 10 the problem is: your array is declared as an array of 10 elements, which sets the valid index-range from 0 to 9, yet somewhere you are trying to access the element on index 10 try by resetting the value from ctr1. also, you may want to re-format the … | |
Re: you may want to be more specific. you can create a gui in the command line, but that would be a very rudimentary. you can create one using Swing, jsp, jsf, gwt, ... also: help you with what? I assume you mean a Swing gui (desktop application). It's not that … | |
Re: the link doesn't matter. it's the code you should be showing. | |
Re: try - catch statements. but how are you expecting to proceed if the server is down? | |
Re: I'm not going to read all the code above, but this snippet did catch my eye: String[] rowData; public recordRowObject(String[] data) { if (data==null) { throw new IllegalArgumentException("\nData cannot be null!"); } rowData = new String[data.length]; foreach(String s : data) { rowData[i] = s; } } actually ... you're taking … | |
Re: in which case it looks like you are asking us to do your schoolwork. your professor said that you'll be exempted for the examination, based on the assumption that you'll know more than enough of java coding to pass the test. that YOU know ... not that we do it. … | |
Re: add an import statement importing the Scanner class (import java.util.Scanner;) | |
Re: nice Java exercise: explain why that code wouldn't compile in Java? | |
Re: if you want to try this: try this. if you have questions about how: don't revive a dead thread, start a new one. | |
Re: you mean on paper, I assume? well, you could use the print api. if you first generate a pdf containing the information you need, and formatted the way you want it to be. | |
Re: you mean show it like a password? what are we talking about here? Swing, command prompt, after showing original text changing, immediate changing? | |
Re: ehm... you add that where you want the user input to be treated/accepted. | |
Re: when your teacher tells you you can use "any source to help you" he first of all means: a source to HELP you, not to do it for you. also, most likely, the kind of sources he talks about are: * Google * the Java tutorials * your coursenotes * … | |
Re: in order to 'change the size of an array', you need to create a new array entirely. something like this: String[] myArray = new Array[7]; static int count = 0; ... public void addElement(String el){ if (count == myArray.length){ String[] tempArray = new String[count+1]; // to reduce overhead, // increase … | |
Re: might be because you haven't got your environmental properties in your OS set right. if that's the case, you can click all you want. as long as the os doesn't know where your jre and libs are, it'll be treated as a simple archive, not an executable. | |
Re: Rozina: don't revive old threads, just start a new one. exactly the same but without ... that means it is not exactly the same. since you are using two separate datastructures, it isn't even nearly the same. | |
Re: Arrays.sort(myArray); will do that for you. just make sure your data type knows how you want it to be sorted. | |
Re: or you could try not to download illegal software. since all the files you claim cause trouble are tools to mess with the check whether or not you have a valid license, I assume this are warez. there will always be risks with warez. do remember: they cracked the application … | |
Re: the problem is, every time you enter data and assign a value, for no matter what type of info, you overwrite the value of name, but you don't set the values for the other variables. for city, this part is what you should change: // Get the name of a … | |
Re: if you are a beginner, ignore Swing. Chrizur: it is possible (even better) not to use illegal software. the JDK is free for download, so are the most used IDE's. anyway: I'm with NormR1 on this. if you're just beginning, use the command prompt and a simple text editor. an … | |
Re: by writing the code. what exactly don't you understand about it? | |
Re: my opinion: if you want a job that's good for 'pay and working hours', don't go into it. if you want to do your job decently in IT, take into account that there will be days you'll have to work ten hours or more, without getting overtime paid, and you … | |
Re: there is no rule as to "who should catch it" that's up to you. you can throw it indefinitely, even make the main method throw it, but that's just a system crash waiting to happen. it's actually the difference between a 'checked' and 'unchecked'. a Checked exception must be either … | |
Re: are we talking 'web design' or functionality? those aren't exactly the same thing. how extended should the site be? when I see 'payment processing', it kind of makes me think this is an application that will be used in the restaurant itself, at the register. Am I right about that? … | |
Re: wouldn't do it either. how am I to know there's nothing 'wrong' with the file (needs an extra codec, contains some unwanted code, ...) for all we know it's a "mySong.mp3.exe", that will show as "mySong.mp3" if the user has it's OS set up not to show the extension of … | |
Re: well, yes, but turning it into an .exe will prevent you from running it 'anywhere', not make it possible to do so. a .jar is a platform independent executable, so just keep that. also: why putting the db in the .jar? | |
Re: doesn't make any sense to me. just drop the ChangeListener and add all the logic that is being called in it's method in the actionPerformed method of the ActionListener. | |
Re: you can store the images inside the .jar file and use these images in your application. just take a look at [this](http://stackoverflow.com/questions/2393194/how-to-access-resources-in-jar-file). | |
Re: ia2[0][0] = (int[])o; here you are trying to store a one dimensional array of ints as single int. ia2[0] = (int[])o; here, ia2 is just one array, the one that is found ia2 is a two dimensional array ia2[0] is the first element of this two-dimensional array, being an one … | |
Re: well, writing code like this catch(IOException e) { } does make it difficult to find your errors. you may be getting error messages, but you are hiding them, making yourself think everything runs smoothly. (not sure if this is your problem, since you don't clearly state what the problem is) … | |
Re: how on earth are we supposed to propose a title, if we don't even know what project you're going to do. if you mean: tell me what kind of project I can do, there are several reasons why we shouldn't, but common sense should help you figure that out. | |
![]() | |
Re: delta frost: any reason why the already existing Exception classes are not sufficient? the point might be, that in the future he might need to use a readDigit method to input data, which throws an exception in case of invalid input. | |
Re: what does this S.O.Pln(); refer to? | |
Re: lots of ways. String concatenation is the easiest. what have you got so far? | |
| |
Re: every type of Object (so, every class in Java) has an equals method. | |
![]() | Re: why would you 'have' to do anything at all? yes, it might be a bit painfull, but have you checked whether or not that person might have a(ny) reason(s) for saying this? maybe he/she just wants to help you to better get on your feet in life, as a help … |
Re: I'm pretty sure the OP (and other posters) in this thread already noticed that, some 7 years ago, when the last post here was entered. saying "hey, it helps!!!" is no reason to revive an ancient thread. | |
Re: passwords are supposed to be 'concealed'. it increases the security you have no one will break into your account. can you imagine what it would be, if hotmail or gmail didn't have this feature, and everyone standing around you could see the password you enter? I'm pretty sure that, right … | |
Re: by having the generic type being SampleA, you specifically make it a SampleA, so, yes, you can have problems casting it back. SampleB and C are acceptec, because they actually are SampleA. all the stuff that these classes add to the mix, is being let out since they are transformed … | |
Re: try by overriding Object's toString method. if you don't, the application 'll just print the reference to the Object, and that looks like what you described above. | |
Re: what do you mean: find them online? they're still being used afaik. they changed the name, not the contents, so why would they change the exam? rubberman: yup, over here, a certificiation is about just that: nice to fill two weeks you have in between jobs, not to have gaps … | |
Re: ehm ... I just tested that code here, and it works perfectly. one remark though, if you want to print those lines below each other, instead of next to each other, you'll need to change your last mutation of the output value to: output = output + "] \n"; did … | |
Re: embedd 'a recursion with arrays'... how do you ask a question which makes sense. don't embed, implement. you implement recursion, by having a method call itself. why do you need an array in that? sure you could use arrays there, but ... | |
Re: no. never pass any arguments to toString. if you do that, you don't override the method, you overload it. your proposal also makes no sense. in the toString method, you can print the values for your class scope variables, and that is what you should do. don't call the makeDeposit … |
The End.