- Strength to Increase Rep
- +16
- Strength to Decrease Rep
- -4
- Upvotes Received
- 1K
- Posts with Upvotes
- 1K
- Upvoting Members
- 321
- Downvotes Received
- 250
- Posts with Downvotes
- 238
- Downvoting Members
- 62
4,084 Posted Topics
Re: a semi nOOb? if you work hard enough, you can be an expert nOOb in no time ;) something you could also have changed in your code, to make it a bit more reusable: [Code=Java] public static ArrayList<String> readFile(String fileName) throws IOException{ ArrayList<String> fileContents = new ArrayList<String>(); ... // read … | |
Re: "Experience is nothing more but the sum off all your failures combined." "Off course debugging is harder than creating the original version. It has to work this time!" | |
Re: depends on what you're looking for: Carmageddon was pretty 'shocking' in it's days, and a new Carmageddon is about to be released somewhere later this year. | |
Re: post decent, original and popular images, add funny, hilarious comments, and make sure it is shared. 'faked likes' can work against you just as easily as they can work for you. in the end, likes aren't worth anything. but when people notice you've "bought" or "generated" likes, nobody 'll take … | |
Re: KentDy: on themselves, those networks won't generate more traffic. It's how you use them. Use them wisely, and they might (never a guarantee) generate so much traffic your server won't be able to keep up. Use them without thinking it through, and they will (this is a guarantee) impact your … | |
Re: what is your guess? if you don't know the answer to this, you are clearly not ready to take the exam. take a look at the sticky threads that are meant to help beginning programmers. | |
Re: John Matt: this thread is nine months old. I'm pretty sure that either the answer has been given already, or the OP's no longer following up. | |
![]() | Re: Drag me to Hell, The Messengers, The Messengers 2 : the scarecrow Django Unchained Silent Hill the Rite ... nyah, had a bit of spare time lately :) |
Re: Just because you nest it into another structure, doesn't mean the syntax changes. Assuming you are using Java: Person pers = getRandomPerson(); // assume this exists char character = pers.getLastName().getCharAt(0); switch(character) { case 'a': if ( pers.isAdult()) { System.out.println("Person: " + pers.getName() + " is an adult."); } else { … | |
Re: I assume he needs help with the // TODO part. I would suggest to get rid of a lot of those //Start and //End comments, it's make the code a bit ... ugly and busy. | |
Re: What exactly is your question? How to get the total prize at the bottom? You can add something like this: double sum = 0.0; for(int i = 0; i < new1.length; i++){ System.out.print(new1[i]); System.out.print(" "+new2[i]); System.out.print(" "+df.format(new3[i])+" "); Total1 = new2[i]*new3[i]; sum += Total1; System.out.println(df.format(Total1)); } System.out.println("\n Total: \t" + … | |
Re: `System.out.println("score");` this prints the String "score", James asked to do: `System.out.println("score: " + score);` so you could verify the actual value | |
Re: Carrie Pugh: Welcome to Daniweb. Just a few hints, though: don't hijack old threads. This thread was answered five years ago. Saying you have no idea what you are doing, doesn't help us ascertan what you have tried. But, in my opinion, you have tried about nothing. "I only wanted … | |
Re: first of all: don't consider this a website, it's an eCommerce. whether or not it is online, it is, in the first place, a shop, so market it as such. check who your target clients are (if you sell metal cd's, that'll be headbangers, if you sell cat- and dogtoys, … | |
Re: You may have Java 15 installed, but according to your screenshots, you are using Java 8 | |
Re: Here's the bit I'm having trouble with: You are already at the stage of using persistence with actual databases, meaning for a beginner, pretty advanced material, yet you don't know how or where to implement a simple conditional statement ... Start without a database. look at your 'bus' with it's … | |
Re: You read them all, and you filter the lines you've read. You only treat/store the items that are valid according to your filter. This is hardly a programming question, though, this is just the logic behind it you have to grasp. | |
Re: PersonalInformation myInfo = new PersonalInformation(); name startName = new name("Joe Mahoney"); startAddress.setAddress("724 22nd Street"); startAge.setAge("27"); startPhoneNumber.setPhoneNumber("(555)555-1234"); This will not work. In clear, it won't even compile. Your PersonalInformation class has this as constructor: private String name; // A person's name private String address; // A person's address private int age; … | |
Re: Kit82polo : if you have a question, start a new thread. don't revive a thread which is not related to your question, and that has been dead for 10 years. | |
Re: >Imagine termites taking over your computer. VegaSeat: Imagine termites being used for RansomWare or a virus :) | |
Re: it seems a lot of people (not all) are "answering" the question without actually understanding the topic. SEO is NOT something you do from a Social Network. SEO does NOT mean get more traffic to your site. it does NOT mean promoting your site. it simply means: making sure that … | |
Re: travel - destination - holiday - .... look for words related to the subject of your site, and users might google/search on. | |
Re: never tried this before, do doubt Java is the language you want to use for it, though. | |
Re: It would be easier to see what you did wrong, if you showed us how you did it. the input variable is supposedly the variable containing the text you want to check, so, best place to do it: at the beginning of the method: public static boolean isPalindrome(String input) { … | |
Re: @Tejaswini, This thread is over 5 years old. it's no use replying to it. If you have a question of your own, please ask it in a new Thread. | |
Re: James, don't forget this is the version that is supposedly no longer free-for-(commercial-)use, unless you use the OpenJDK version. | |
Re: you can't have two public classes in one file, you can have only one public class, which has the same name as your java file. | |
Re: are you sure you want to make a video chat application? sure, it makes a beautiful project, but if I take a quick glance at what you've got experience with, I hope you won't get overwhelmed, then again, 7 months gives you some space to learn new frameworks. this might … | |
Re: System.out.println("you already entered that word"); it's that easy. now, if you have further questions, please start a new thread and don't revive threads that are no longer active. | |
Re: first of all: you shouldn't have re-started a thread that was solved a year ago, you should've started your own. show what you have (not the above code) and say what problems you are having with it. | |
Re: I'm not sure if that is all to it. Personally, I found the old forum layout easier to work/navigate with, so after the switch I didn't visit that often anymore. No doubt this won't contribute to the bigger part of the leaving members, but it might explain a few. Also … | |
Re: if you are a 'newbie', as you yourself state, and this is a school-project (meaning limited time) either choose another (more realistic) topic, or prepare to accept defeat. There are tons of developers here who will sacrifice their spare time to help you out, but there's a difference between helping … | |
Re: Sahil please start your own thread. but, to answer yours quickly: you can't. this code goes searching on the local drive. There are tons of libraries out there that provide you with a google/yahoo/... search for your website, on which you can choose to 'search this site' or 'search the … | |
Re: this is javascript, not java. You may want to update your tags, so it is shown in the correct subforum. | |
Re: and how do you expect us to help ? you assume we know the contents of your local files ? what data are you expecting ? how do you know nohthing is inserted ? have you checked whether or not the code you are calling works the way it should … | |
Re: ... By writing the code that does so. What is it you're having specific problems with? | |
Re: You could at least have mentioned what it is you're stuck with. Did you add code yourself, or just copy-pasted from that tutorial? What do you expect the (current) code to do? Does it compile? Does it run? If you get exceptions, are they compile- or runtime? Can you show … | |
Re: it just won't repaint ... that's a pretty vague description. what does it do? do you get error messages? does it compile? what behaviour exactly did you expect, and which lines of code did you expect to be executed, but appear not to be? did you debug your code? | |
Re: also: unless your 'app' is just a front-end connecting to a remote back-end, forget it. Java is pretty easy to decompile. ship off your .jar (or whatever) file, and it might take the user less than 5 minutes to have full functionality anyway. | |
Re: It would help if you show the entire stacktrace. Just to give a direction to look at: a `NullPointerException` is caused by (trying to) accessing an instance member of a non-instantiated variable. In your case, part of the problem is your while loop. in your `run` method, comment out the … | |
Re: of course it fails. servlets (and jsp's are compiled into servlets) run on the server side, not on the client side. Next to that: I very much doubt what you are trying is possible. It would cause quite some security concerns if it did. | |
Re: Kennie, just a few remarks... seeing as this is a 5 year old thread, was it really necessary to bring it back? secondly, since you have `vehicle` as a variable on class scope, why do you still pass it as a parameter to your method? for bonuspoints: can you find … | |
Re: it boils down to this: step 1a: learn to read data from a JTable (which is not an array, just so you know) step 1b: write the code that does so step 2a: learn to write data into a DB step 2b: write the code that does so step 3: … | |
Re: check your `Model` class catch(SQLException e){ } and your `DBCon` class catch (SQLException ex) { } | |
Re: as to your remark: debugging has nothing to do with verifying whether it compiles or not. it means it compiled and it can run. debugging is running an application, but with the possibility to enter breakpoints. This can come in handy for several reasons: 1. If your flow does not … | |
Re: True, that will work, but I wouldn't get too hung up on it. If it is indeed a local installed desktop application, the user (if he knows some Java) is more than capable of editing the application to remove the restriction from the application. Spending months of research to implement … | |
Re: why make it so complex? you can have the entire functionality from String object to reversed String object in ten lines of code, without having to go recursive. | |
Re: not to mention, there are a lot of examples on this forum itself. | |
Re: just starting out with Java and already trying to implement your own AI??? a tip would be: start at the beginning, and first learn the basics (yes, that will take more than two days of studying). |
The End.