4,084 Posted Topics
Re: Atanas: something tells me you are just advertising this product. if you give this as answer on a current or active topic, no problem, but if you revive several old threads just to promote this decompiler, it seems a bit obvious to what you're doing. | |
Re: you can easily write a method that does that, or a simple regex validation would suffice. off course, this would only check whether or not the e-mail address is 'formed' as an email-addres: <userName>@<hostname>.<domain>, it wouldn't check whether or not the e-mail address entered actually exists or not. | |
Re: do you understand what null is? it's the default value for a non-instantiated but declared Object. since it has no value (yet) you can't call a method on it. there are two ways to avoid this from happening: 1. add an conditional statement, checking whether or not the element you're … | |
Re: bump Why on earth are you 'bumping' this thread??? either the answer you're looking for is in it, or it is not. if it is: use it. if it is not: no harm in doing something radical, like starting a new thread. | |
Re: can you elaborate a bit more? what exactly are the requirements? what is the error message you are getting if you get one? | |
Re: you may want to elaborate a bit more on the actual assignment. one thing though, you may want to keep your two-dimensional array as a variable in another scope, either on class scope, or in the main method itself. the method that should show the contents shouldn't re-populate the array, … | |
Re: [QUOTE=king000000;720546]I havent done java in a while and not sure what to do with the void methods please can someone help me out thanks whole thing is in a zip file as well done in bluej as there is a long list of code here. }[/QUOTE] you mean you've putted … | |
Re: where did you get this code? it's very inefficïënt, there's a standard method that does this for you. next, don't just copy paste code here, since you don't understand it, it's obvious that you didn't write it yourself. start by saying what you think it does, and we'll correct you … | |
Re: GeekTool: take a look at the java api's, check what the indexOf method does, and explain why you think he used -1 as comparator. | |
Re: because you never use it. you create an instance of SwingWorker (worker) and define it's methods, but unless you actually call those methods, how did you expect to use it? | |
Re: some of your 'literal' errors: I is with a capital you don't need the word 'a' in the title. you forgot the 'is' (verb) in your statement and you should've put that 'a' in front of 'message server', and, again, I should be capitalized. the more logical ones: you have … | |
Re: about everything can be made without for loops, but do you really want to repeat code while you can easily put it in a loop? writing code is not just "getting it to work", it's more about "getting it to work in a manner that costs me the least effort, … | |
Re: while(p<11){ a better approach would be to change the above to: while (p < a.length) since you don't always know the length up front. this way, you won't reach an arrayIndexOutOfBoundsException, whether you keep the same number of elements or decide to change that number. | |
Re: I assume you're familiar with [URL="http://www.w3.org/"]W3C[/URL]? | |
Re: started about 1998 first with VBA (blah), later on, tried to work a bit with VB6, programmed in Cobol, C++, assembler, Java, JavaScript and Perl ... hmmm, that's about it, I think :) | |
Re: > double a;b=0; that's your problem. you're trying to assign 0 to b, but you didn't declare what b is. replace it by: double a; double b = 0; well, actually, that's just your first problem: > a=double.parsedouble(in.readLine()); Java is very case sensitive, double is not the same as Double, … | |
Re: ever heard of google? basicly, you're here asking whether we can provide you with code, that you can re-use and hand in as your final project. that would be cheating. also: there are specific asp.net and vb.net fora, you can also ask questions you have there. but beware, if you … | |
Re: have you tried to run your jar as an executable locally? looks to me like you didn't point to the entrypoint (class containing the main method) in your manifest.mf file correctly. > I can share it with friends but whenever I use eclipse to make it a jar or executable … | |
Re: define "not working". does it compile? does it run? do you get a compile time error, runtime errors, what's the error message? or does it just not work the way you expect it to work? | |
Re: well, if you come up with one, I would be interested to know :) | |
Re: either learn gwt, or servlets and jsp. and this would be for basic creation. best would also to implemment other frameworks, hibernate, for instance. It would decrease your workload on the DB part a whole lot. you're saying you only want to spend one year at it. are we talking … | |
Re: you are making this way too complicated. break down your code in methods that way it'll be way easier to read and find any problems in there. | |
Re: OutOfBounds is usually if you have faulty logic in a loop that's retrieving info from, or storing data in an array. int[] x = new int[5]; x[5] = 3; will give you an ArrayIndexOutOfBoundsException, since there is no element with index 5. | |
Re: and what do you mean: "which RadioButton of JMenu"? a JMenu uses JMenuItems, not RadioButtons | |
Re: tried this? String[] argsToPass = {"main","method"}; MainClass.main(argsToPass); | |
Re: you mean how to distribute it? create a .jar file, that way, your application can be run on clicking it. (that is, provided the jre is present and installed, of course. no jvm? no running java application) | |
Re: Deitel & Deitel : Java How to program is a pretty good one, too. | |
Re: the first step would be to print the two values, for instance: 'firstPass ' + " == " + 'secondPass' maybe in one of the two you have an upper case, which would mean they're not equal. | |
Re: System.out.println(); you'll need to provide a String as parameter to be printed System.out.println("this will be printed"); for instance | |
Re: make a functional analysis (not just the vague description, but more detailed). based on that, decide on what objects you need, and what methods you'll require. choose on IDE/text-editor, and start making the basic objects of your application. complete the code. | |
Re: javascript is not the same as java. I think you would be better of posting this in the javascript section. | |
Re: those errors are quite self-explaining. for some of them, you are using a variable you haven't declared yet. for others, your application expects a single double, while you pass an array of doubles. considering the first is a primitive, and the second is an object, this should be clear why … | |
Re: first: check for the same length, if not, return false. else iterate over all the chars in the original String . if !secondString.contains(char) return false you mean something like that? | |
Re: NormR1 is right. the split() method is what you should use, but I'm not sure why he suggests regex here. if you use the comma as separator split(",");, the way JamesCherrill suggests it, you have what you need in the second element of the resulting array. (which yes, you still … | |
Re: makeP3Picture(); >>> this is the method call you make. public static Picture makeP3Picture(Picture source) >>> this is the actual signature of your method a method is basically 'identified' by two things, to let the compiler know what method is being called: 1. the name of the method 2. the list … | |
Re: you're not supposed to run your db "in netbeans". you just need to write the code to connect to your MySQL DB. it's not working ... what does that mean? did you get to set the settings all correct (not just copy paste, but linked to your own db), is … | |
Re: yet will not do what shean asked for, since it will augment if either one of them is true, it will even augment if none of them are true. just take Thines' code and alter it a bit: int expression2Evaluated = 0; while ( expression1 && expression2 ){ expression2Evaluated += … | |
Re: and still has the return a; in front of a lot of code. can you post your current code? | |
Re: other possibility: you do have that method in your GradeBook class, but you haven't compiled it since you added that method. | |
Re: use the [JOptionPane](http://docs.oracle.com/javase/6/docs/api/javax/swing/JOptionPane.html) class | |
Re: well, if you've spent hours working on it, no doubt you have some code to show us? show us what you have, tell us what it's doing (wrong) and add any error messages you get. | |
Re: add the correct type, name, signature, ... and it should work just fine, that is, of course, if you call the correct methods | |
Re: well ... you can use the [File-class](http://docs.oracle.com/javase/6/docs/api/java/io/File.html), starting from your root (this could for instance be C:/) and then use a recursive method that returns the result of the listFiles method of the File class. | |
Re: Arrays.copyOfRange(s, 0, N) returns the array as it is. you're not changing it, so you're continously calling the method with the same input, and the same result | |
Re: they're also used to simulate multiple inheritance, since multiple inheritance is impossible in Java. notice, I said "simulate", since this is not multiple inheritance. the main differences between extending classes and implementing interfaces: - you can only extend one class, while you can implement as much interfaces as you want … | |
Re: public Phone[] createPhones(String d[][]) { //need help as of what goes in here } well, there you need to create an array of Phone elements, the number of which: the number of elements in the 1'st dimension of d. those, you instantiate using the information in the arrays stored in … | |
Re: by adding a setter, I assume public String getFieldValue(){ return field.getText(); } | |
Re: by adding a setter method in that other class and calling it from your first class. | |
Re: so ... the OP was too lazy to work on it himself, you just hijack this thread and expect us to solve it for you? and if that's not enough, you then go and copy-paste the assignment to create a new identical thread??? mwa .. mwaaaaa .. hope you're not … | |
Re: ash: did you seriously revive this thread to post what has been posted 6 days ago? |
The End.