458 Posted Topics
Re: Have you heard about Google ? Cause it certainly must have heard about both the terms, I am sure. | |
Re: [code=java] scan.nextLine(); String str = scan.nextLine(); [/code] This is what causes the problem. You are already moving your scanner past the line read. Remove the first scanner.nextLine(); Read the Scanner docs [URL="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Scanner.html"]here[/URL] for more details. | |
Re: [B]>alcay : I want to be programmer[/B] Well C is a good place to start learning. Even C++ is fine. But C++ is considered an extension of the C language and for many reasons it indeed is. So normally tutors, schools, colleges etc do start with C and then move … | |
Re: [QUOTE=sujithy15;1126128]i didnt get u[/QUOTE] He probably knew you won't. | |
Re: My first job after completing my post grad was in a very small organisation - I was the eighth guy. So in almost no time I was conducting interviews for potential candidates and was doing so for a long time after that. From my experiences of those days -, I … | |
Re: Class Player, wherever it's declared needs to have a constructor having the signature [CODE] public Player(int, int, int, int, java.awt.Color, lang.String){ } [/CODE] | |
Re: Why are you like this ? Okay let me keep it simple. Google. | |
Re: "[B][U]Unnecessary crap no one asked you about and no one's impressed by.[/U][/B]" I guess you forgot the title to your post. | |
Re: [QUOTE]Is this really a true story?[/QUOTE] No, it isn't. It is more of an urban legend. Check the link given by jonsca. | |
Re: You have made a lot of syntactical mistakes here. [CODE] if (number % i == 0) return false; else return true; if (false); [/CODE] Do you really think the control will ever reach the line "if (false)" ? Also let's for a moment assume it does, will the control ever … | |
Re: [QUOTE]you will be a lifesaver if you can provide me with this little task[/QUOTE] No we won't, Sun has already taken up the task of being the lifesaver of thousands of such people by writing the Java tutorials. Read the tutorials for AWT/Swing and for the various layouts. Now it … | |
Re: 1. Class Cars doesn't have a main method, so how do you'd expect it to run ? If you need to run it put a main method in it which acts as an entry point for a program to run. 2. In the CarsInventory2 class [CODE] public double gettotalInventory() ; … | |
Re: The very first thread in the forum has answers to your question. The next time please take a look around and get acquainted before you post such questions. | |
Re: You need to declare the parameterized constructor. | |
Re: [QUOTE=fardoonmuhafiz;1122227]Hey Mr.BestJew you need not tell me to google or not google before posting a thread.......stop giving ur crap suggestions.....its upto me to post the thread or not....[/QUOTE] Mr. Mr check your attitude here. Everyone's here to help but it isn't to be taken for granted no one's obliged to … | |
Re: post your code, check with the instanceof operator in java what instance is actually residing in the ExitInterface type variable. | |
Re: I suppose you are allowed to use the String class' methods. 1. For longest & shortest word use length method of String. 2. To split use StringTokenizer class 3. For palindrome make use of the stack ds. If you cannot use String methods you'll have to traverse the string maintaining … | |
Re: Use regex to check whether a string is made up of alphanumeric characters or only letters then print out the ones you need. | |
Re: I suppose here, the word [I]interface[/I] doesn't mean the Java language type. What it wants to mean is a [I]contract[/I], much like how it is between a library developer and it's user. The word here maps more closely to the method [I]signature[/I]. Something like "overidding allows multiple methods to have … | |
Re: Firstly to separate out the words in the string, you could use the StringTokenizer class and split the string based on space chars. Secondly stack is a common data structure used for checking palindromes, so that you push every character from a word into the stack till you are half … | |
Re: [CODE] double price=0.0; double rate=0.0; // other initializations [/CODE] These are local (method) variables, which are also known as auto variables. And the tricky part is that auto variables are never initialized automatically for you as their name would rather suggest. You need to initialize them before using them, else … | |
Re: [QUOTE]but i wanna learn java![/QUOTE] The thread at the top of the forum will only help you in your resolution. | |
Re: Use functions - will make code readable, maintainable. Draw common and put it at a single place. For example the SOPs could be handled in a function of their own dedicated to display/output instead of writing them so many times. Only the required values need to be accessible to them. | |
Re: You are creating a ByteArrayInputStream from the byte array 'buffer', which has just been initialized. [I]byte[/I] being a primitive type will initialize to it's default value which would be 0 (??). Then you are using this ByteArrayInputStream - baos - to create an ObjectInputStream. The constructor documentation says: [QUOTE]Creates an … | |
| |
Re: Do these records have a particular format, are they line separated ? as in one record per line ? If yes then you could read the file line by line and use the appropriate splitting criteria to get individual tokens. If not then you first need to establish a format … | |
Re: Apart from the mistake mentioned by the adatapost, here's another: [CODE]public void Pitch (String types);[/CODE] that appears to be a method without definition, remove the semicolon at the end of the line. | |
Re: [QUOTE=~s.o.s~;1116835]Not necessary if you are talking about exceptions in general and not the Exception class. Exception classes which extend RuntimeException and Error can be used in the throws clause without forcing the client or the consumer to catch them. This is normally done for documentation purposes but is perfectly legal … | |
Re: A project topic should be chosen according to one's interests, especially if you are given the liberty to do so. Programmers don't need to be given a topic they just have this idea in their mind about something that could be. About something that could be done in a better, … | |
Re: To delete an element of an array shift all elements up by one index position starting from the next element from the one to be deleted so that the element to be deleted is overwritten. For e.g. If you have an array: 4 9 13 10 17 3 20 and … | |
Re: [QUOTE=fortnbry;1115416]Thread.currentThread().sleep(1000);//sleep for 1000 ms[/QUOTE] Thanks that was particularly helpful, especially because the Java guys haven't put a word about it anywhere in the docs. | |
Re: The document for the SMPP Protocol v3.4 can be found at [URL="http://www.smsforum.net/"]SMS Forum[/URL]. The open source library for SMPP along with the API Docs can be found at [URL="http://opensmpp.logica.com/introhtml/menu.htm"]Open SMPP / Logica[/URL] | |
Re: Yes, the information on this [URL="http://en.wikipedia.org/wiki/Binary_search_tree"]URL[/URL] describes the BST in detail. To add further lets explain what the BST [I]is[/I] actually. The BST or a Tree in general in the context of Data Structures, is a collection of Nodes. Where a Node has the following properties: - Each Node has … | |
Re: Try it and see for yourself, if it doesn't work tell us the error. | |
Re: To repeat what BJSJC has said, there is a [URL="http://www.daniweb.com/forums/thread99132.html"]sticky[/URL] at the very top of the forum which lists out all things that a beginner of the language might require including free online books, tutorials, links to get the JDK, names of a few of the best books etc which … | |
Re: I have never used IntelliJ. My personal fav is Eclipse by far. JCreator is another good IDE for small projects but when things start getting serious where you require all the services offered by a host of varied plugins nothing comes close to Eclipse. I have used NetBeans and the … | |
Re: [QUOTE]the application below is what i did so far, please give me feedback[/QUOTE] If it does what you have been asked for, if it works for you. We cannot be more happy. :) | |
Re: You mean once it is done your program should ask him for another class and so on. What you need to do is to use a menu and keep returning to it. So the menu should be printed in a while loop which has a termination clause that the user … | |
Re: Where are you using the counter to check whether it has been incremented or not. Post the entire code. PS: He beat me to it. | |
Re: You could use the split method to split the filename on the period (.) then check what the latter part of the splitted content contains you could behave accordingly say return "Text File" if it contains .txt and "Non-text File" otherwise. You cannot return anything apart from true/false from a … | |
Re: State the exact error you are getting, or the part of the code that isn't working according to plan. | |
Re: [QUOTE=isuruj;1107619]I am using CruiseControl Binary Release 2.8.2 and I am sending mails using this. I can only send the url for log file generated by the software. So I need to add some text to email body and attach a file. So can you please tell me how should I … | |
Re: Firstly, an abstract class from definition contains atleast one abstract method so this means that not every method in an abstract class should be abstract. So if the add() method is identical for every student you could place it in the Student class instead of the specific sub-classes. This way … | |
Re: I guess you need to return from a method whose return type is declared as void. Just put the return keyword without specifying anything after it. [CODE]public void check(){ // code for the method return; }[/CODE] | |
Re: If your select queries work but deletes and inserts take time it should have been a problem of locking. Basically it could have been a case where one of the previous operations put a lock on the table which wasn't released, hence the delete query could never obtain the exclusive … | |
Re: >AbhikGhosh What do you think you are doing by giving away code like this ? It is for him to do and for us to help him do it on his own, thats the whole essence. I suggest you try to avoid this in the future. | |
Re: Hmmm, I guess you missed the "We-offer-help-only-to-those-who-show effort" theme of this site. Please take a careful look around and while you are it drop the IM/chat speak we give more respect to full words. ;) | |
Re: I have not gone through your code, but from what you suggest about the task at hand I guess you would have to do something like this: 1. Print a menu/ or Show GUI about various operations/tasks a user can perform. Such as Add Char, Edit Char, Remove Char, Search … | |
Re: From what I have understood you need to do, it is something like this: You have created/worked on the project on a different computer on eclipse and now you want to switch the machine for some reason. If this is what you need to do, follow the below mentioned: 1. … |
The End.