4,084 Posted Topics
Re: also, this is rather a 'remark' than an 'error', which is why the 'Tool completed successfully' :) | |
Re: define "same format" your separators in one line aren't even identical. read the line in as a String use the space char as separator, split the first element you get on the place where you have the '.' and remove the ' " ' s from the last element then … | |
Re: yes, but what questions do you have except for: can anyone code my homework before I have to hand it in? what's the code you tried that isn't working? what error messages do you get? ![]() | |
Re: can you copy paste the exact error message? what parameters are you passing in the command line? | |
Re: jLayer is pretty straightforward to use, and it comes with quite an extensive api documentation, so what is the problem you are having? you'll find everything you need to know documented and explained by the authors themselves, what more do you think we can add to that? | |
Re: [QUOTE=zeroliken;1717348]Make a constructor in the Product class that returns a String and a Double only[/QUOTE] a constructor that returns a String and a Double? I assume you ment: Make a constructor which takes a String and a double (lowercase d) as parameters? | |
Re: you're stuck on the loop... what loop? you haven't got a single line of code, let alone a block of code with a loop in it. | |
Re: [QUOTE=hszforu;1717634] multithreading,proxies,scraping are some of the important topics that you must know as a software developer and i am just trying to explore my knowledge. [/QUOTE] indeed we must be aware that it exists yes, for the reason Peter_Budo has mentioned ==> SPAM what you describe is an application that … | |
Re: [QUOTE=cOrRuPtG3n3t!x;1717676]Thanks for the reply, however i have created a fully functional database in java netbeans gui creator which had a lot of dynamic creation and as long as you know the name of your components all is fine. however i do agree an IDE gui has alot of 'hidden' properties … | |
Re: what does your error message say? the entire message? | |
Re: hmmm ... well, my knowledge of Math s*cks (to say the least). Off course, having a background in Math will make it a lot easier to quickly learn some things, understand certain patterns and behaviour, ... but not being an A-grade math student doesn't mean you can't learn Java programming … | |
Re: I have ... no idea what you are talking about what do you want your servlets to do? are you entirely sure it's servlets you're looking for? if you are looking for a way to compile java files you don't need servlets. | |
Re: you could create an object which has two variables: int number and int numberOccursNTimes while next number read number check in stored numbers whether number already occured if yes add 1 to numberOccursNTimes for number else create new occurence with number as number and 1 as numberOccursNTimes end-if end-while // … | |
Re: have you checked the [URL="http://docs.oracle.com/javase/6/docs/api/java/util/Random.html"]api[/URL]? 'a' is a character, which has a numeric value as well, what is handled by the compiler. so c will be the value found by rand.nextInt(26) + that numeric value. c is not converting anything, the compiler is doing that. | |
Re: w is an array of ints, c (and c * 3) are ints. you should set c * 3 to an element of w, not to w itself, or you should declare w as an int | |
Re: sure ... there's no reason why you can't use JavaServlets and JavaScript in combination, but, if the Servlet is only supposed to 'load' the html page (when working with Servlets, I think .jsp files might be better, in case you want to pass information on from the servlet to the … | |
Re: by declaring them both as public. what you are describing is not true: you can have unlimited classes in every package, and they can all be public, protected, package, ... scope it looks to me like you're mistaken with: having multiple (inner-)classes in one file. it is true that you … | |
Re: to find out the output of those few lines, why didn't you just run the code and check it yourself? | |
Re: nope ... you can find the value of 'Enter' online if you want, but it would be easier to just compare to a fixed value to stop (and no, "" is not the value for enter) next to that: != is not the way you check for not-equality between objects, … | |
Re: what error message do you get? have you read it? in about 99.99% of all cases it tells you exactly what goes wrong and where it goes wrong. | |
Re: how about this: [Code=Java] public static double sum(double iter) { String SumInput; double NewNum; int count = 1; double Total = 0; while(count <= iter) { SumInput = JOptionPane.showInputDialog("Enter number " + count + ":"); NewNum = Double.parseDouble(SumInput); Total = Total + NewNum; count = count + 1; } System.out.println("The … | |
Re: why do you need to know what DB he's using? you know he's getting his information into an ArrayList, and he wants to display them in a GUI. everything he needs is to add a JTextArea into his GUI, and for each element of his ArrayList he'll need to append … | |
Re: pretty difficult to say where your problem is ... what do you mean by: seem to be having problems? what problem? does it give an error message, if so, which one, ... it's obviously a Java issue, since ini4j is a Java api, but whether the issue is within ini4j … | |
Re: a is creating a new String object, with value "1010" in b you are using == to compare two Objects. you can not compare objects on equality using the '==' comparator. this will determine whether the two objects you've given have the same reference, but this can only be done … | |
Re: you may want to elaborate a bit. what don't you understand about it? what is going wrong? | |
Re: what do you need to compare? that both arrays are equal? how many elements they have in common? | |
Re: ehm ...what exactly do you mean? based on your description alone, my answer would be: several possible ways to achieve this come to mind, but they all contain the very difficult and (almost) impossible to master technique of COPY - PASTE. I'm pretty sure that, with just a little research, … | |
Re: if you are just learning, I would not recommend starting to use features of IDE's that (re-)write your code for you. yes, they come in handy, but, and especially when learning, since you will get the results, but, not necessarily in a 'developer-friendly' way (now I'm thinking about the GUI … | |
Re: ehm ... you're already doing that, right [Code=Java] jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); [/Code] there I mean to say, you're already adding actions to the buttons, but you'll have to add the logic you want them to perform to it, before they'll actually 'do' … | |
Re: so, you've studied Java for four years, haven't bothered to Google 'print + Java', actually believe we are going to go through every line of code you've written for your thesis without getting even a bit of usefull information? what do you mean by 'print' (I assume on paper through … | |
Re: My guess is: you get 24 seconds to throw as much balls through the basket as possible, or you have to score 24 times, and time how long it takes the user. you can use a thread to run your own timer, or continuesly compare the systemtime against the time … ![]() | |
Re: this has nothing to do with separate files or not. when you use variables, your variables need to have unique names, so, either you rename your second String xml; (and also in all the places you refer to this one, or you remove this line, since String xml already exists. ![]() | |
Re: except for the default constructor, which is automatically generated during compilation if no other constructor is provided. the more interesting code to look at is: how do you use this class? where do you call it's methods? | |
Re: a NullPointerException is thrown when you try to use an object which you didn't instantiate. The default value for a (non-instantiated) object is NULL, so, if you create an instance of an object, using the default constructor which doesn't set the variables in the object itself, and call the getter … | |
Re: [QUOTE=prathimat;1714687]its giving error:2. Can any one help on this[/QUOTE] step 1: formulate a question step 2: start a new thread rather than reviving one that has been dormant (not to say dead) for over years step 3: give a wee bit more information about what you're doing... whát are you … | |
Re: well ... either this is not your entire code, or I don't doubt you're getting error messages. a class should always end with a } to close the class scope, not with [Code=Java] while ( i < 27 && guess = true); [/Code] | |
Re: so, if I understand your question correctly: you want, if you create a method: [Code=Java] public int addTwoIntegers(int one, int two){ } [/Code] your IDE to automatically generate something like: [Code=Java] public int addTwoIntegers(int one, int two){ return one + two; } [/Code] ?? how do you think to do … | |
Re: [Menu]Window > [MenuItem]Show View > [Option]Package explorer [Menu]Window > [MenuItem]Show View > [Option]Projects depending on which one you mean | |
Re: well, considering the first of your messages states he's not finding a certain constructor of the course class you are calling, that would be extremely helpful. the second line, you should remember you need to end all methods (and method calls) with () (unless off course you need to pass … | |
Re: maybe, but that's not the point they should not just call each other. they are supposed to give the calling class alternative ways to create an instance of the class. | |
Re: try the sticky thread on top of this forum that's all about STARTING WITH JAVA and stuff.. what do you want your teacher to do? hand you the solution? what have you got so far and what problems are you having? | |
Re: even if you choose it without your advisors help, he'll still need to approve your topic. | |
Re: your previous code was better by far, why did you not just keep that and implement the logic into it? | |
Re: can you post your code in [ Code ] tags without the extra lines and symbols in? | |
Re: well ... never having tried anything like this, I'm not sure this is possible without having a client of the application. afaik, the server doesn't know anything about who's calling it's methods or using it's classes. it's like having a servlet application showing a JOptionPane dialog: it will be shown, … | |
Re: but, off course, if you write in your catch-block some statements that will exit the program, you can there end your program any way you want: displaying a stacktrace not displaying a stacktrace giving an error message (popup) ... | |
Re: [QUOTE=hfx642;1713213]You only need one loop. In that loop, decide (if) which character you will print. [I]I like the fact that you are building and returning the string for printing.[/I][/QUOTE] you use a loop per line, so you can check by character where to change to the second one, but you'll … | |
Re: [QUOTE=i_ignore08;1713011]but if im going to change my code in line 25-27 the output will change...:( any suggestion sir?[/QUOTE] isn't that what you wanted? | |
Re: it takes you about ten seconds to write this yourself... have you tried it yet? | |
Re: ehm ... keep your logic in one package your gui parts (frames, panels, ...) in another and your dataobjects in yet another.. what are you having trouble with? |
The End.