File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Help with assigning Array Size Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Help with assigning Array Size" Watch "Help with assigning Array Size" New topic
Author

Help with assigning Array Size

Peter Kolozvary
Greenhorn

Joined: Sep 06, 2008
Posts: 6
What the heck is the problem?



The error I'm getting is Salaries.java:33: incompatible types
found : java.lang.Double
required: int
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1321

EMPLOYEES is double type variable.. for declaring the array size.. you need to pass int data type.



now see this error again..

Salaries.java:33: incompatible types
found : java.lang.Double
required: int


hope it helps.


Saifuddin..
[Blog][Linkedin] How To Ask Questions On JavaRanch My OpenSource
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24189
    
  34

Why not Integer.parseInt()?


[Jess in Action][AskingGoodQuestions]
Peter Kolozvary
Greenhorn

Joined: Sep 06, 2008
Posts: 6
Thanks, I took a different route and have another question.

I need to Display the Names and Salaries of all Employees that are higher than the Average. I have included the code which shows how to display the highest salary of them all but am having trouble figuring out how to display this for each employee.

 
rocket mass heater kickstarter
 
subject: Help with assigning Array Size