Chuck Mondi

Ranch Hand
+ Follow
since Oct 14, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Chuck Mondi

I am learning Java and was curious if there are any good introductory books on Java game development. I want to be an Android developer which is why I am learning Java. Once I have a firm grip on the language, how can I begin to learn Java game development? Do I need to know a lot about Physics to build an engine? What do I need to know in order to build games? Thanks in advance.
13 years ago
Pete,
I believe you answered my question that it is an anonymous class.
13 years ago
I am somewhat new to Java and am exploring Android development as it peaks my interest. In the book Pro Android 2 Development, the author uses a snippet of code below. I don't however understand why he is implementing the code the way he does. I don't know why new onKeyListener with the onKey method is being passed to the setOnKeyListener method. I can see passing an interface object, but why an interface object and its implemented method?

13 years ago
If you take a look at the exercise they added x = x + 1 to the while clause. This will increment the value of x in each iteration of the loop. If you never use that statement, x would always be 1, the while statement condition (while x < 10) would never become false (x = 11), the println would never print a value because x would never be greater than 3 and it would run forever.
14 years ago
While I am learning Java, I am also interested in learning about the software development practices and OOA&D. Both of these books look similar. In your opinion, what book is reecommended to be read first? Thanks.
14 years ago
Paul,
No. The PeopleSoft program is dynamically generating the XML placing it into a file with an extension .xls. Other Excel files are created from what I believe to be comma separated values which is why they are so small. The benefit to using XML is that you can provide formatting options and such that I don't believe you can provide with comma separated. So for example, our PeopleSoft application is dynamically generating the XML below. I have a feeling there isn't going to be anything that I can do to decrease the size. Either I use comma separate values and forgo my ability to format the look of the data or I use XML which could result is a somewhat large Excel file.

15 years ago

Paul Clapham wrote:Are you asking about the Excel 2007 format? The one whose extension is normally XLSX?


Paul,
No. I am not referring to the .xlsx 2007 file format. We are generating Excel .xls files via XML using our PeopleSoft system. These files are generated on both Windows and Unix machines. The only downside to the utility is that it can result in a large Excel file (I've had one be 200mb) I'm assuming because it is using XML to create it. Sure when you download the Excel file from the PeopleSoft system and open it in Excel 2007, you can resave it either as .xls or .xlsx and it will dramatically decrease the size. I wanted to avoid having users do this.
15 years ago
Has anyone had experience using Java to decrease the size of an Excel XML file (.xls)? If you programatically use XML to create an Excel file, the file size can grow incredibly large. Would there be any way to use Java to decrease the file size?
15 years ago
Please use Code tag in your post.

After doing a little bit of research (because I was unfamiliar with doing this) I think I found a solution for you. The String class has a toCharArray() method that will place a String into a character array. I am still new too but hopefully this will help. You can use some of this logic to figure out how to load the characters into a new string variable s3.

15 years ago
For the getter methods, it looks like you need to use if logic to determine what to return. It looks like the constructor initializes the title and quantities for each format (DVD and Blu-ray) that are in stock. So, if you look at the getMovieStock(char which) method, how will that method know whether you want the stock number for the DVD or Blu-ray of say The Dark Knight? It uses the 'char which' method parameter. So if it uses a method parameter you will need to have if logic that will determine what stock number to return for the format the user requests. Here is what I would do. Use this type of logic for the other methods. Assume that types of movies have chars 'D' for DVD and 'B' for Blu-ray.



As you can see, if movie is a DVD it will return the intMovieDVD amount, otherwise the movie is a Blu-ray and it will return the stock amount of intMovieBlueRay. As I said before you need to use similar logic for your other methods including the setters. If not, how will they know what variables to update?
15 years ago
In my book Head First Java, they explain that you must override the equals() and hashCode() methods from Object in order to use a HashSet. I was also looking at the Deitel Java How to Program book and they don't state that you need to override equals() and hashCode(). Is there a preferred way to using HashSets?
15 years ago
Can anyone provide information (links, books, etc) that would have valuable information on how to develop tests for your Java code? In reading Head First Java I recall them talking about testing code, really writing your tests first, then your classes and such, but it really isn't illustrated. What defines a good test for your Java code? Any help is appreciated. Thanks.
15 years ago
I am almost quite done my Head First Java book and will no doubt need to continually use the concepts in the book in order to enhance my Java skills. After I get done the book, what would everyone recommend I do? Is there a good intermediate book for Java? Besides reading a book, what could I do to enhance my Java skills to the next level? Note: Eventually, I would like to do Java EE development.
15 years ago
Ritchie/Everyone else,
Thanks for the info. I'm not familiar with pointers but I can research that. When should I use new Class(); versus Class myClass = new Class()? Should I only use the shortened version when I don't need to use a reference variable throughout my application?
15 years ago
What is the reference variable name given to this instance when using new SimpleChatClientA().go();? Like how does the application know what object to call the method on?
15 years ago