4,084 Posted Topics
Re: can you show your entire code? it's possible you didn't initialize your ArrayList correctly or in the right scope, also there might be something wrong with the input. can you also show the complete stacktrace you get when you get that nullpointer? | |
Re: when you click your button, you're not going to perform the actions in the ClickButtonClass because you are not adding that kind of Listener to the Button. let your ClickListener class do the action you want to perform and you'll need to take a closer look at how to build … | |
Re: well, it appears there's something wrong with the file you're trying to copy. just trying again won't solve the issue I'm afraid, you may have to go back to the original source (hope for you that isn't the not back-upped original of your file) and download it again, or copy … | |
Re: a : is something being mentioned, it's not an actual error that will block your program b : what error do you mean? can you show how you tried with params and what error message you get? c : input what code? is that how you start your app, a … | |
![]() | Re: maybe you should ask the people at GoDaddy, since they are handling your dns and hosting? |
Re: as Ztini said: experience beats certification. if you do want to take the exam, there are no guarantees whatsoever. the only thing you can do is: - know the material covered by it - prepare for the exam (for instance: don't keep camming until 5am the day you're going to … | |
Re: how do you try to run it? what's in your main method? what error message do you get? if you are trying to run one of the above classes, it will fail because there is no main method in them. | |
Re: what help do you need? you know what to do, the only thing you need to actually create and test that application is a keyboard, and since you've been able to write that post, I 'm pretty sure you already have one. show us the code you've written and where … | |
Re: you've called your audioplayer MGP, but you call the start method on MPG, that's why it doesn't find that one. the other error, I'm not really sure about, I've never used that class, but it looks like you're calling a class from outside the scope where it can be called, … | |
Re: well ... being bad at mathematics doesn't mean you can't make it as a developer (unless of course you decide to go writing mathematical applications). but logic, kind-a important. go check for logical puzzles, try to solve them, and then try to find a better way to solve them. if … | |
Re: well, if it doesn't do what it 's supposed to do, probably corrections are needed. do you get wrong output, does your application crash? be a bit more specific. also, don't do: [Code=Java] try{ // your code } catch(Exception e) { } [/Code] you are just hiding the error message, … | |
Re: bit confused here. what is your actual question? | |
Re: [QUOTE=fatooma92;1774777]i need someone to do this program for me and before saying that i have to do my homework alone i had midterms all week and in about in hour or so and i forgot about this assignment and i just dont have time so plz help here it is … | |
Re: what error messages do you get? | |
Re: read every line as a String for each String you want to parse, you can either write a regex to find the inner part, or you can calculate the indexes and use the substring method | |
Re: just google for 'jQuery menu'. you'll find tons of easy-to-implement scripts to do just that. | |
Re: well ... a good way to start is: add informative contents. best with starting to provide information about one subject, you know a lot about yourself. just copy-pasting wiki-entries without knowing for yourself whether or not the article is in fact correct, or just a pile of 'blabla' compiled by … | |
Re: don't just hand out code. checking whether or not a number is a prime number is very easy, and there are tons of threads about this already, not to mention the milions of examples online. giving him the code when he's not even doing the effort to try, or even … | |
Re: how is this: Exception in thread "main" java.lang.Error: Unresolved compilation problem: Type mismatch: cannot convert from Object to int. not clear? you are trying to convert an Object to a primitive dataType, of course that doesn't work. | |
Re: [Code=Java] Object[] row = new Object[3]; for ( int i = 0; i < 3; i++) row[i] = readObjectFromDB(); [/Code] if you don't know up front how many items there will be, use a List or a Collection. is your key stored in the DB? | |
Re: toString() returns a String representation of the Object it's called upon, or, if you have that code exactly, the toString method from within that same class. (Object) just parses that what follows to the type Object. since a String (and actually every Java Object) will pass a is-a test when … | |
Re: do you know up front how long (many digits) your number will be? | |
Re: we're not in this for the glory, we're doing this because we like to do this ourselves :) you can also notice that a lot of people say thanks in the original thread, so not posting here is not the same as being rude. for a lot of those who … | |
Re: I can't find a TextBox or jTextBox in there. what field are we talking about? | |
Re: what do you mean by a variable? your String itself is a variable. if you want to create a File object named after that String: [Code=Java] String ss = "file1"; File myFile = new File(ss); [/Code] slight remark: the above will just create a File variable, not an actual file … | |
Re: have your application run on your server, and check the logs on a regular basis. I don't really understand what it is you're trying to do: an application that runs at the clients system and the logfiles go to you? | |
| |
Re: why are you asking for a filename, if you are going to use a hardcoded one? also: you are reading the charAt from the filename your user entered, not from the file you're working with. your max is based on the length of the contents of File1.txt, but you are … | |
Re: yes, you can create a method in your GPA class which take the array as parameter and then print it, but that is very bad OO design. | |
Re: pati[i].setdata(); since pati[i] is still a null value, you'll have to begin with: pati[i] = new Patient(); // or other constructor, anyway, you can't (shouldn't) call methods on a non-existing instance of an object. | |
Re: JFrame has nothing to do with JOptionPane. a JFrame can be used to create your own user screens, so yes, also a 'dialogbox' with as many input fields you need, in the layout you want it to be shown in. [URL="http://docs.oracle.com/javase/tutorial/uiswing/"]This[/URL] would be a good place to start learning how … | |
Re: well ... I'm not sure why you make a palindrome check this complicated, but anyway.. I think either you didn't think your logic out straight, or you 're mistaken about what a palindrome is. also: what ArrayQueue class are you using? all you really needed to do is: iterate over … | |
Re: well .. what do you think your setters and getters are for, if not to exchange information between several classes? | |
Re: that's a wee bit hard to see, if you don't show any code, nor how you try to update your code or where you want to update it. in a JTextField, in JLabel, ... | |
Re: I'm not going to go through an attachment, is i that much trouble to copy paste your assignment in this thread along with your code? | |
Re: what you are doing has nothing to do with actual programming, you're just trying to do everything without the programming, which is why you don't have any control over it, and why you don't know if somethings going wrong, and, if so, what. try hardcoding the setting of values in … | |
Re: well, if you want to work for yourself, you have to be able to deal with some extra costs. for instance: what if you do have a project, but the payment from your client arrives a few months later than expected? sure, in a perfect world that would never happen, … | |
Re: how hard do you think it is to write that? try, and within about ten minutes there will be one. | |
Re: well, why wouldn't you be able to use a double as a counter? and converting an int to a double? what good whould that do? you would have decimals, yet, but since every value stored in an int is always rounded (since it has no decimal capacity) all your prints … | |
Re: did you enter a value in all the input fields you are trying to get a value from? | |
Re: looks to me like your tour_guide variable in holiday is of the type 'Person' so you'll have a private Person tour_guide; in your Holiday class, and the mutators (setter and getter) to set and get the values. | |
Re: [QUOTE=sambhu singh;1772398]i want to knw like how it will read the text file application.txt? and i'm try to run this exm in eclipse but cannot how to ?[/QUOTE] write your own code, there are examples enough on the forum to help you out. this thread hasn't been posted in for … | |
Re: static: class scope. instance variable: instance scope. if it's not a static variable, it's an instance variable. they can only be reached through an instance of the class, so can only be accessed if an instance is created. if you set the value for an instance variable, you set it … | |
Re: nope, it's a bit the "no pain, no gain" scenario. using Windows/Linux is supposed to be quite easy for the user, but try to write one from scratch, that'll be a bit harder to do. look at the first link mKorbel provided you with, that's your best place to start … | |
Re: and never just copy what you see in a 'youtube-tutorial'. every dimwhit whit a webcam or screen capturing software is able to make so called 'professional tutorials', that doesn't mean they're actually any good. all you need to know is how to create a basic Swing GUI, for which you … | |
Re: you probably used wrong casing (upper-lower) to name your files. two remarks: instead of throwing a ClassCast exception in your compareTo method, just return false (that is the expected behaviour) and, don't allow your main method to throw an Exception. if need be, put a try-catch block inside your main … | |
Re: your first problem: in your ArrayDrawer, you have this method: [Code=Java] addTriangle(Triangle z) [/Code] but when you call it, you pass a double as parameter, not a Triangle. since a double is not a Triangle, your compiler can't process it. for your print problems: [Code=Java] /** * Print out the … | |
Re: even if it were possible, it would run on the server where you have your exe stored, not on the client where you want the exe to be executed. | |
Re: and how will your code while running know what to filter out? it must have a list of words stored somewhere. whether they're hardcoded or entered by reading them from an inputfile, you can still use the contains method. whether you have: [Code=Java] if ( text.contains("myWord")) [/Code] or [Code=Java] String … | |
Re: package everydayUse.Print; here you are saying that your Print class is inside the package everydayUse.Print; but you are not importing a package named everydayUse anywhere. |
The End.