4,084 Posted Topics
Re: well, you can use the 'i' you use to iterate over your input, and print (at index i there's vowel <vowel>) | |
Re: normally not. it just makes it a hell of a lot harder to maintain (if you are interreseted in that) | |
Re: you call [QUOTE] MONDAY TUESDAY WEDNESDAY THURSDAY FRIDAY SATURDAY SUNDAY ---------- ---------- ---------- ---------- ---------- ---------- ---------- 0 0 0 0 0 1 1 [/QUOTE] a code snippet of html??? | |
Re: as JamesCherril points out, that problem is what you get when you misuse the brackets: you've either forgotten a { or a }, or you've simply placed on of these on a wrong location. I've taken a quick peak over your code, and, well, it's kind of sloppy work. just … | |
Re: your assignment says you should take two integers as input. Why are you reading two doubles? also, be very carefull with what you do: a double is not the same thing as a Double since you are asking this question, I must assume you're getting an error message, or at … | |
Re: also: don't put two return statements in one method, that's bound to give errors. you do realise there's a big difference between a Scanner object and an integer (primitive) I assume? | |
Re: for my opinion, read my answer in the 2009 thread you hijacked. | |
Re: @looklikeasfine: did you seariously re-open a dead thread in order to ask us to do your homework for you? here are a few pointers: we don't mind helping you with your problems but, keep in mind: 1. if you have a problem, start a new thread, don't hijack someone elses … | |
Re: you're not supposed to "make" a Stack, just use it. everything you need from a Stack is already been written. so what exactly is your problem? I don't really see a question in your post. | |
Re: and what do you mean: do not fit in my schedule? unfortunately, once you've graduated and you start working, do you think your employer will adjust his schedule to yours? you'll find a lot of situations like this later on in life, some of the regulations at school/university (for instance, … | |
Re: and we're supposed to know this without knowing what you have in that class? | |
Re: tkud has a point, Objects and Classes are very basic stuff in an Object Oriented language. anyway, a good way to start, would be to take a look at the sticky thread on top of this forum. Or, you can visit it by clicking [URL="http://www.daniweb.com/software-development/java/threads/99132"]here[/URL]. | |
Re: Googlink "Error 1723" will give you loads of entries in forums where people are discussing that problem and how to work it out. | |
Re: and what exactly is your question? 1. decide what kind of gui you want 2. check what frameworks or libraries you'll need 3. read up on some tutorials 4. start coding if you have some problems with the code, ask them, but don't expect us to completely write a GUI … | |
Re: you're making it way to difficult on yourself ... why creating an entire class to deal with the basic functions of an array, which you can take care of with about 3 or 4 lines of code in your main class? | |
Re: so, the method has to return b ... how would you solve this? | |
Re: [quote=pavani2006;369806]sorry i am not trying to find the given string is palindrome or not,i am trying to find from a given string is it possible to form a palindrome or not? suppose u input "oppa" from this string it is possible to from a palindrome "pop" but if u input … | |
Re: so, if I understand this correctly, you have something like HostileArea > containing a row of DungeonRoom objects and DungeonRoom extends HostileArea ? well ... the first element can't make the second element of your row perform an action, you'll need the actual second element to do that. what do … | |
Re: what exactly is your question? if this is the "right way" to store "user info"? that would depend on what info you want to store and how you are planning to use it. what you have shown above has nothing to do with storing user info, you're just creating an … | |
Re: [QUOTE=hiddepolen;1670506]Use a do {} while (); loop. Pseudo-code: [CODE] String input; do { input = getInputFromUser(); } while (input != 'n' && input != 'y' && input != 'Y' && input != 'N'); doWhatEverYouWant(); [/CODE][/QUOTE] ignore this answer. the logic might look correct, but, and here 's a very big … | |
Re: you're trying to call a setter method on a NULL-value. you have to instantiate your film object before you can use it. just check your Addfilm method: [Code=Java] public static void AddFilm(Entity[] film){ for(int i=0; i<film.length; i++){ if(film[i]==null){ Scanner scn=new Scanner(System.in); System.out.print("Enter film's code :"); film[i].setItemCode(scn.next()); System.out.print("Enter film's title :"); … | |
Re: what can be change number to letter? I don't really understand what you're asking here | |
Re: and since you reuse the name currentPrompt and use MenuOptions as name for your enums, I suggest you drop currentPrompt in the line JamesCherrill mentioned | |
Re: acquiring a good knowledge of a technique requires time, whether it is Swing or any other framework. if time is your main issue, I would (very much against my own advice) use NetBeans, it can generate the Swing parts for you. but, mind this: you will be able to 'present' … | |
Re: no, your array most definitely is supposed to be in your test-class. otherwise, for each event you're creating, you're creating a new Array of n elements. you've had your classes extend SocialEvent, which is a very good way to start. now, create the SocialEvent[] array .. in your testclass. each … | |
Re: well ... you read your file, store the contents (for example) in an ArrayList. then, you iterate over that list and you perform the replaceAll method on the elements of this list. afterwards, you can store the contents in that arraylist back into the file. but, if I were you, … | |
Re: wellll ... there's a tricky one, since they don't really use the same characters. as far as unicode is concerned, I've worked with the ICU4J library, but can't say much about farsi or arabic. it may be enough to use this library, but I'm not sure about that | |
Re: [QUOTE=zenStone;1668938]dis s Zen , please help me to mke program in java that has GUI its hard for me to mke coz i can't understand... please give me some tips thank you!!! this is my project and I can't think well coz I'm sick....[/QUOTE] Zen ... first of all, if … | |
Re: well, you have the amount of elements in the array (10), so, you know that the indexes of your array will vary from 0 to 9. create an empty array of ten elements write a method that returns a random number between -1 and 10 (so including 0 and 9, … | |
Re: so ... what code is there in your methods? would be able to give us a hint of what your code is doing. just saying: [Code=Java] public class UseEmployee{ public static void main(String []args) {codes} } public class UseDir{ public static void main(String []args) {codes } } [/Code] doesn't really … | |
Re: and what do you mean by asking US about the project YOU are working on? do you think we know more about it than you do? | |
Re: [QUOTE=javaflasher;1664771]hey dude!! i know no one cares about this thread but people who search on google about insertion sorting it might be helpful to them!! its for them not for this thread!! GOT IT[/QUOTE] hey "dude", JamesCherrill is right. If you have found thé way to do this task, no … | |
Re: propably the point of this exercise is for you to figure out the obvious: why this code isn't working and to correct it. it is very, very basic to declare a variable. if you are taking a programming class, chances are this is about the first thing you've learned about, … | |
Re: [QUOTE=jeanrlavoie;1656417]Hi all, one of you guys answered the question in page 2, but everyone ignored it :P Here is an exemple of what he was saying. You can't technically switch on String[/QUOTE] you do know that Java 7 was released, and in Java 7 it Ãs possible to use a … | |
Re: another reason would be that it's mainly a request for code. have you tried to implement it yourself? do you have enough background in Java to try it yourself? | |
Re: [QUOTE=JeffGrigg;1659957]Personally, I would let the exceptions kill the program, rather than just ignoring them. Like this: [CODE] import java.awt.image.*; import javax.imageio.ImageIO; import java.net.*; class Blur1 { public static void main(String[] args) throws Exception { float[] matrix = { 0.111f, 0.111f, 0.111f, 0.111f, 0.111f, 0.111f, 0.111f, 0.111f, 0.111f, }; BufferedImage sourceImage … | |
Re: a NullPointerException means that the value you are trying to use does not exist. check your variables, where they are used and where you give them a value. that might help you find the problem | |
Re: [QUOTE=ohyeah;579950]brilliant[/QUOTE] that you can't read dates? mwa, not so astonishing. about Sandwiches99, if you know you're 4 years late... why still post? | |
Re: as for the exception, java doesn't support mp3 by default, you would need to get (or write :) ) packages that do that for you. wav files don't give errors, because they are supported | |
| |
Re: [QUOTE=NormR1;1638836]What class is the Equal() method in? I've never seen it. Why are you posting code that does not exist?[/QUOTE] sorry, ment to 'up' your answer by one | |
Re: so ... what's stopping you from doing so? | |
Re: or you could browse the Oracle website for their tutorials, they're bound to have the best tutorials for basic implementations and behaviour of java applications. | |
Re: as licenses are concerned: random generator might do. if you want only those who paid for a license to be able to use it, link a username and a serial nr in a db you control, and put a check in the application, that checks whether or not the users … | |
Re: I assume he's just trying to get the hang of extending and implementing interfaces and classes, in a course he's following. | |
Re: can you be just a bit more specific?? what do you want? to get a single element? or to return the entire array? and how is the array stored in your object? is it an instance variable? or is it for instance a static array containing info? | |
Re: what I assume you have been looking at, is a simulation of such vending machines. they are used to learn how to create a bit more extended applications than the basic "Hello world!" | |
Re: could you paste the complete method in which you call this one? |
The End.