4,084 Posted Topics
Re: another (yet smaller) remark: private boolean checkProcessed(String accNum){ if (processed.contains(accNum)) return true; else return false; } is basically the same as: private boolean checkProcessed(String accNum){ return processed.contains(accNum); } it's not really necessary to create a separate method for this, since in order to 'write less code' you actually write more, … | |
Re: you are printing it exactly the way it is in the file. in that file, it looks like you have a comma as separator. use the split method of the String class to seperate the parts and print them the way you want. | |
Re: LastMitch: servlet is part of JSP? no. not really. they work together, but they are seperate files (in a decent application, that is). jsp's are translated into servlets, agreed, but the servlets you write yourself are not part of a jsp. | |
Re: ehm ... ravi... why wouldn't you be able to re-install? that makes no sense. just re-install and load your current workspace in your new installation of the IDE | |
Re: why would you want to do this in Java? looks like you're choosing the wrong tool for the job. | |
Re: what are you trying to compare? the reference or the value? why would you need another way? anyway, the 'compareTo' methods 'll work just as well. cwarn: be careful how you explain what you say: A==a => in light of Java this is false. | |
Re: deceptikon already told you how to fix that. you are running a for-each on assetClasses, which is not an array, but a single String. replace that by `for ( String asset : splits )` | |
Re: a lot of ideas. for starters, don't hardcode that 79. use the length of the word. also don't use arrays of Strings. use a String and the charAt method, or myString.toCharArray(); you are having problems with this: for (int i= 0; i < 79; i++) { character[i] = scan.next(); if … | |
![]() | Re: just lost .. what exactly is it you're stuck on? can you be a bit more specific? |
Re: how to set the number of guesses? int nr = keybord.nextInt(); for ( int i = 0; i < nr; i++){ //guess } you may want to refactor your code a bit: if(another.equalsIgnoreCase("y") == true) { anotherFlag = true; } else { anotherFlag = false; } that block, you can … | |
Re: there is no real specific description of what 'core' and what 'advanced' java is. I've seen employers consider Swing to be advanced, whereas in my opinion it is core. it's always useful to know some frameworks: Spring, Spring MVC, Hibernate, JPA, GWT, ... there are tons of things to learn. … | |
Re: e.getSource() is something you expect in an actionPerformed method which's ActionEvent parameter is called e. In the method you try to call 'e.getSource()' you don't have an e variable. either you put that code in your actionperformed, or you add an ActionEvent called e as parameter. But, since this wouldn't … | |
Re: F_1 : welcome to Daniweb. please do note, this is not 'coderz for hire', 'gimme tha codezzzz' or 'do my homework for me'. what have you got so far, and what actual question(s) do you have? | |
Re: also: you don't have to go this high: (randomNos-1) going to the half of the number 'll be just fine. another little 'refactoring': if (noRemainder == true) return false; else return true; why not just replace this with: `return !noRemainder;` even if you want to keep the above, it's still … | |
Re: this question is almost a year old and the OP never returned, so I think it's safe to say she won't read any future replies. | |
Re: your 'myStudent' doesn't "contain" null value, null indicates that your reference object doesn't reference anything, and is actually useless. it means you haven instantiated that variable yet. you'll have to check whether the initialization is reached. looks like you did instantiate it, but we'll have to check the Student class … | |
Re: what do you mean 'page'? the best thing is to perform the actual actions in a servlet. and yes, why would you have to create a seperate jsp or servlet? | |
Re: what have you got so far? this is not a 'code on demand' forum. | |
Re: automatic code generation usually equals crappy code. write the code, rather than to generate it and assuming it will always do what you think/expect/want it to do. | |
Re: ehm .... best way: update regulary, and don't wait until you are with a log file of size 45GB .. you could automate it, so that it runs every night for a fixed period of time and performing each time a part of the task, until it's completely done, but … | |
Re: help you with what, exactly? that's great that you have all that in html, but do understand, html itself isn't really a very dynamic language. what is it you have, what is it you still need, and what have you tried so far to get it? | |
Re: [QUOTE=rajeshwarreddyt;546418] when user hit the application URL the user should login automatically with out prompting any user name and password(BCZ he is already a windows authenticated user) [/QUOTE] then why the hell would you put a login and password in your program?? the fact that your pc is running doesn't … | |
Re: Ellena980: something tells me this post is nothing but a way to advertise the links in your signature. 1. the OP already had a similar line in his original post 2. it shows that you are not all too familiar with OO concepts. you should have used the equals method … | |
Re: not to mention that a solution with less chance of throwing exceptions might also be preferrable. | |
Re: why not use servlets? having java code in your jsp files seems handy at first, but it's a sure street to what is referred to as 'spaghetti-code' | |
Re: "check the effects"? what effects? that validation comes in handy, to check whether your code is according to the standards (which should ensure there are no browsers that 'll have problems with it) | |
Re: I just lost a game I wasn't even playing ... so it's been proven, I can do the impossible! My mom must 've been right all along ;) | |
Re: looks like it can't find a database named 'finals', but in your code, you hardcoded the name 'Finals'. | |
Re: he can still do both. having worked for Google 'll look very good on his resume later on, unless he gets fired after a few days, naturally. it's also possible to first work a few years and then continue studies. not as easy maybe, but still possible. | |
Re: create methods: printMainMenu(); printSubMenu1(); ... and on case 5: --counter; if ( counter == 0 ) printMainMenu(); ... | |
Re: by writing the code, compiling it and running it. this is a dead thread, if you have an actual question, start a new thread, and do provide a bit more of information than the bit you've provided here. | |
Re: well, that's not really what JOptionPane is meant for. the best way to go is to create a simple JFrame that provides this functionality. | |
Re: did you overwrite the toString method in your Employee classes? | |
Re: my advice, a few simple refactoring would make that code a lot easier to read and maintain. a 'for instance' case 1: first=JOptionPane.showInputDialog(null,"What is your first name?","First name",JOptionPane.QUESTION_MESSAGE); last=JOptionPane.showInputDialog(null,"What is your last name?","last name",JOptionPane.QUESTION_MESSAGE); ssn= JOptionPane.showInputDialog(null,"What is your social security number?","SSN",JOptionPane.QUESTION_MESSAGE); DayofBirth.toString() =JOptionPane.showInputDialog(null,"What is your date of birth?","Day of Birth",JOptionPane.QUESTION_MESSAGE); … | |
Re: your question is more about inheritance then overriding, but anyway. why might you want to instantiate Figure? well, maybe not at all. or, you want to create an instance of a Figure that is neither a Triangle, nor a Rectangle. `Figure circle = new Figure();` for instance. | |
Re: getActionCommand sounds like the name of a method. you'll need () after that, basic Java syntax. | |
Re: by ... writing the code to do that? most basic (that I can think of) would be to iterate over the columns and use `table.getModel().getValueAt(int row, int col);` | |
Re: also: exception handling is great, but exception avoiding can help as well. write a test that checks whether or not that file exists on your system, before trying to run it. | |
Re: don't keep looking for those, first build up some experience aka a reason for them to consider you to be interesting. if you do want to follow their vacancies ... I'm pretty sure Microsoft, Yahoo and Amazon have figured out how to create an official website by now... | |
Re: why would you want that? the more 'friends' you have, the harder it is to have a decent contact with any of them, since you'll be dividing the same amount of time among an increased number of 'friends'. the only reason for someone to have 'as much friends as possible' … | |
Re: http://stackoverflow.com/questions/3949980/what-programming-languages-can-one-use-to-develop-android-applications | |
Re: by writing the code that does this. we can't really say much about your code without seeing it, now can we? | |
Re: who was the person who invented he could drink the milk of a cow after milking, and what exactly did he think he was doing at that time? | |
Re: first of all, if you still study J2SE it shows you are not really looking into current technologies. (J2SE became out of date about 7 years ago) the University Authority, as you call it, gave YOU the task to select the final project topic. selecting a topic is a part … | |
Re: ok... so, you have code ... now what is the actual question? preferably, don't give your variables names like a give it a meaningfull name, so that the code becomes more clear and readable. | |
Re: [this](http://in.relation.to/Bloggers/HibernateORM425FinalReleased) might be worth a look. | |
Re: [click here](http://bit.ly/1ayz02O) or buy a good Spring book. | |
Re: int[] nums = new int[inputFile.nextInt()]; this doesn't fill the element of the array, it creates a new array. what you want is: integers[i] = inputFile.nextInt(); |
The End.