4,084 Posted Topics

Member Avatar for infiniteloop56

"I am getting a bunch of errors" ... see, it would be better if you told us what errors, when they occur (runtime, compile time, ... )

Member Avatar for jwenting
0
122
Member Avatar for LianaN

malli: talking about overkill . did you read James' reply? the same functionaity in a simple: `s1.contains(" ");` and there's no use in saying "that wasn't there yet when I posted", since that reply is three years old.

Member Avatar for stultuske
0
19K
Member Avatar for cemonica

some recommendations: throw away about all of the comments in that code. just look at this part of your code: public class OfficeSupplies { //Beginning of OfficeSupplies class //Declare instance variables private int itemNumber; //Item number private String productName; //Name of product private int unitsInStock; // Number of units in …

Member Avatar for Schol-R-LEA
0
199
Member Avatar for hbelle.28

malli: something that just came to me now (didn't notice it in your previous source codes). besides the fact that your code is faultive as can be (according to your code: é is a digit, which it really isn't.) if you want to boost up the efficiency of that code …

Member Avatar for stultuske
0
484
Member Avatar for jhamill

make an array of chars, filled with all the possible capitals, iterate over this array and check if the string contains the char ... the .contains method could do that for you

Member Avatar for stultuske
0
3K
Member Avatar for Orgest

ehm ... create a new file, copy the contents, then, delete the original one. I don't get what it is you are asking. how to create the copy, or how to list all the files in a folder, or, ...

Member Avatar for stultuske
0
255
Member Avatar for Maggie_1

the infinite results is because of this: while(randNum != 5) { counter2++; System.out.println("Total bottles needed to find a winner:" + counter2); } you tell the application: as long as radNum is not 5, add 1 to counter2, and print this line. that is when it goes back to the check …

Member Avatar for Maggie_1
0
396
Member Avatar for dothack123

if you want to add spaces on every line, why add the if statement? if (line.contains("{")) { spaces += " "; line = spaces + line; } in the first line, you are telling your application only to run the two lines within the block, if the line contains "{". …

Member Avatar for dothack123
0
191
Member Avatar for rob.sigmon.1

> Modify the Inventory Program by creating a subclass of the product class that uses one additional unique feature of the product you chose (for the DVDs subclass, you could use movie title, for example). so; create a subclass of product with one additional variable > In the subclass, create …

Member Avatar for Schol-R-LEA
1
560
Member Avatar for AbstractEden

a few things I would change: don't instantiate Scanner in the instance (constructor) itself. you'll create a new instance of Scanner for each and every instance of Student, which is a waste of resources. just create a constructor that takes two parameters (String name, double gpa), and set the values …

Member Avatar for stultuske
0
4K
Member Avatar for sam_7

actually, this is not that difficult. what you need to do first, is to check whether you need to write it in one single loop, or are allowed to use nested loops, and whether or not the array will always be int[x][x] for int[x][y] the implementation would be different. if …

Member Avatar for stultuske
0
170
Member Avatar for DawnofanewEra

what is a "sql table" ? I assume you mean a database table? well, hibernate or jpa can help you out, no doubt.

Member Avatar for stultuske
0
250
Member Avatar for surya55

an array in Java is an Object. not an Integer, but still an Object. so, you pass two instances of Object to doStuff, and the only method you have capable of dealing with this is: static void doStuff(Object... o){ s += "2"; }

Member Avatar for JamesCherrill
0
279
Member Avatar for razamughal67

razamughal67: you seem to be mistaken. what you are asking, is JavaScript, not Java. even though the names seem alike, they are not even remotely related. One is a scripting language, the other is a platform independent programming language. anyway, it is fairly easy to manipulate the css scheme for …

Member Avatar for razamughal67
0
172
Member Avatar for Wisnu_2

by correcting your code, no doubt. you didn't post your actual goal, just some code that doesn't do what it's supposed to do. you've also posted an "ideal" output, but you neglect to mention how that output is (logically) built, and why that is the output you need to get. …

Member Avatar for Wisnu_2
0
256
Member Avatar for joshua_8

well ... get both values and use the equals method. then it's just a case of forwarding to the right page. I don't see the difficulty you seem to be having?

Member Avatar for stultuske
0
144
Member Avatar for emmas4impact

idea about what ? if that is your process flow, either you are working on a dummy project, or you don't truly understand a process flow, or you have an idiot making your analysis for you. you could start of with a wsdl and xsd's describing your service and the …

Member Avatar for emmas4impact
0
227
Member Avatar for Ritesh_4

find all occurrences of </p><p> and replace it by <br/>, then, check if there are occurences of either <p> or <br/> with a space as next char: `while(spaceNextChar()) removeChar();`

Member Avatar for stultuske
0
214
Member Avatar for kayleigh0411

because you use instance variables in your calculations. if not provided, they have a default value of 0, which isn't changed in your further handling of the fields, so, your calculations lead to 0. basically: what you end up with is this: public double calculateGallonQuantity() { roomArea = roomWidth * …

Member Avatar for stultuske
0
281
Member Avatar for hahahanz

... this code makes no sense. you have no abstract methods whatsover, and you don't implement them in child classes. in the code above, I have no idea why you even have a child class. actually, on a second glance: it's even worse. your main problem has nothing to do …

Member Avatar for stultuske
0
176
Member Avatar for Stefce

so: actually, the problem is that you haven't written the code yet? what is the concrete question you want to ask. if it is how to. step 1: clear the screen. step 2: get the right coordinates you clicked at step 3: create a circle with the correct radius and …

Member Avatar for Stefce
0
2K
Member Avatar for laavanya

are you talking about createStatement ? this is a method from the Connection interface, returning a Statement. just check [here](http://docs.oracle.com/javase/7/docs/api/java/sql/Connection.html#createStatement()) . EDIT: the Statement interface doesn't have a createStatement method, by the way. if you check the api, you'll see this: > See Also: > Connection.createStatement(), ResultSet which is basicly …

Member Avatar for JamesCherrill
0
365
Member Avatar for Jonathan_7

JamesCherrill: price an instance variable ? it's declared within the main method, just like all the other variables. where do you see it as an instance variable ?

Member Avatar for JamesCherrill
0
166
Member Avatar for karan parmar

if you want to print the array, why using a for loop? my guess, you want to print the values of the elements (not the actual array itself). just go through a loop (either a classical one, or an enhanced for loop), and pass the element of the current iteration …

Member Avatar for stultuske
0
36
Member Avatar for Ritesh_4

these links are worth looking at: [DateFormat api](http://docs.oracle.com/javase/7/docs/api/java/text/DateFormat.html) [SimpleDateFormat api](http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html) [SimpleDateFormat examples 1](http://www.javablogging.com/java-simpledateformat-examples/) [SimpleDateFormat examples 2](http://stackoverflow.com/questions/5580965/java-date-formatter)

Member Avatar for Ritesh_4
0
792
Member Avatar for kayleigh0411

look at line 182 in your code (it's pretty hard to see above which line it is). it seems like you are calling a method on an instance variable you haven't instantiated yet. and that field would be "grossIncomeJTextField". the reason for this is: in your createUserInterface method, you are …

Member Avatar for stultuske
0
2K
Member Avatar for DkgMarine

DkgMarine: that makes no sense. first of all, String is a part of basic Java. if that can't be found, your JDK wasn't installed decently, or you didn't set the path of your IDE correctly. next to that, as James pointed out: there are some serious violations against Java's rules: …

Member Avatar for stultuske
0
171
Member Avatar for OMDYD

`String output="Sum of the Addition of "+num1+" "+num2+" "+num3+" "+num4+" Sum` is missing a "; at the end. it should be: `String output="Sum of the Addition of "+num1+" "+num2+" "+num3+" "+num4+" Sum";` or: you didn't close your String literal, as your error message said.

Member Avatar for oussama_1
0
412
Member Avatar for Santanu Das

maybe he should ask the seller himself. at least that person 'll be aware of the actual difference (be it in $ or in %) between the selling price and the purchase price.

Member Avatar for ElliotNorton
-6
181
Member Avatar for chewie20601

remember for a next time "have some errors" is pretty vague. always try to be as specific as possible.

Member Avatar for chewie20601
0
433
Member Avatar for thewalrus

InetAddress receiverHost = InetAddress.getByName(args[0]); int receiverPort = Integer.parseInt(args[1]); String message = args[2]; you need to pass as arguments: * the InetAddress * the receiverPort * the message in that order. since we don't know your configuration it'll be pretty hard to be more specific.

Member Avatar for TylerD75
0
371
Member Avatar for jordan.nunnery.75

DonnSchwartz: ever took a Java course and handed in the solutions to the assignments writte in C ? why not Cobol? at this point, the OP doesn't need another language, as JWenting stated, she needs to think about the classes/methods she needs, and start writing them. as for her last …

Member Avatar for jwenting
-1
166
Member Avatar for patricia28

ok, so now you've posted the assignment, what is the actual problem you are having?

Member Avatar for ddanbe
0
258
Member Avatar for Siick7

in your constructor, you have the parameters set like this: `public DVD(String title, double stock, double price, double item)` but you call it like this: dvd = new DVD(1, "Just Go With It", 8, 2.04); dvd = new DVD (2, "Gnomeo and Juliet", 2, 1.34); ... the title should be …

Member Avatar for stultuske
0
115
Member Avatar for moaz.amin.37

so, you've told us what you need to do. now, what exactly is your question about it? get an array of chars from the String, then check each element, and verify that the next element of the char is valid. if not, throw an Exception.

Member Avatar for BenWard
0
418
Member Avatar for myiwlu10

don't just copy paste your assignment here. work on it, part by part, and at least try. you're not even bothering to mention which parts you are having trouble with, you just copied your original baseline code and assignment. go step by step, and when you run into something you …

Member Avatar for stultuske
0
134
Member Avatar for rayan22

that isn't even the entire main method. it's impossible for us to make anything out of this, let alone know what you are looking for. but, anyway, you have a ')' too much in your `double newBalance = savingsAmount * Math.pow((1+annualInterestRate/12),(numberofMonths*12)-1)/annualInterestRate);` no doubt your compiler already told you this.

Member Avatar for stultuske
0
99
Member Avatar for xxmp
Member Avatar for Raymond_5

hericles: you missed the first problem: there is no opening bracket after the class definition. public class Receipt public static void main (String[] args) { should be: public class Receipt{ public static void main (String[] args) { and, even though hericles is right about the ')' that shouldn't be there, …

Member Avatar for stultuske
0
190
Member Avatar for Linda Schrier

what seems like a good way to go? you'll always best use several ways combined. have a lot of keywords, keep your page active, keep it up to date, ... also: when written using a framework like GWT, you might need a little 'hack' to get google to take your …

Member Avatar for happygeek
0
238
Member Avatar for DawnofanewEra

that error states that you are trying to run/load a class called Program.bin, and that class isn't found. did you alter something, change something in the path, or the libraries of your project?

Member Avatar for stultuske
0
180
Member Avatar for Boby Smith

brianMagento: chances are, if the OP hasn't figured it out yet, he's not looking (anymore)

Member Avatar for stultuske
0
86
Member Avatar for Pablo149

This is almost an impossible question to answer, but I'll try to shed some light upon what it should contain, and why it is pretty hard to answer it. The first step is not, building a portfolio, it is gaining the knowledge you'll use while building up a portfolio. Just …

Member Avatar for stultuske
0
3K
Member Avatar for Slavi

privacy is a nice thing, but complete privacy is a thing of the past. maybe better as well: complete privacy implies that nobody knows you, and that seems a pretty dull life. as for all the security camera's they have out there, and all kinds of recording material ... they …

Member Avatar for vegaseat
0
402
Member Avatar for himanjim
Member Avatar for puk.akhimien

Slavi: the way I understand it, he types: `4*5=20` so, here he has: first: 4 operator: * second: 5 result: 20 <result> = <second>th multiple of <first> Puk: how is this different from printing: <result> = <first>th multiple of <second> ? if this is not what you are doing could …

Member Avatar for Puk_1
0
154
Member Avatar for Arvin1
Re: Java

re-read your original post (which contains the assignmet, and thus the steps to take) and write the code.

Member Avatar for stultuske
-1
416
Member Avatar for newprogidk

public double getsideLength() { //x is undefined. Null Pointer Exception return x; } what do you mean, NullPointerException? this won't compile, how do you expect a RuntimeException on this ?

Member Avatar for stultuske
0
173
Member Avatar for bro3886

are we talking virtual, or an actual "car" that you'll be driving around in your living room or something like that? if it's the second, don't go for Java. go for a language that 'll be able to completely interact with the hardware to go with it

Member Avatar for stultuske
0
755
Member Avatar for ADETUNJI_2

are we talking about a webapplication, that you are running in that browser, or are we talking about a browser written in Java for which you can alter the source code? if not, I very much doubt it.

Member Avatar for Slavi
0
192

The End.