Matthean Brown

Greenhorn
+ Follow
since Sep 03, 2015
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
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 Matthean Brown

basith ali kamil wrote:

Jeanne Boyarsky wrote:Remember that the Head First Java book uses an old version of Java. It's still a great first book, but make sure you supplement it with another to learn the newer syntax features.



oh, what book will you suggest me to read?



I would start aiming for books that cover at least Java 8 since 9 is just about to come out. If the Head Start book is the 2nd edition one from 2005, then yeah, that looks to be Java 5. I have a soft spot for books by Murach since they tend to take a rather application driven approach to things so you start small and then add on as you go and end up with an app at the end. One thing to consider, Java does a lot of things so you'll want to figure out what you want to focus on(web, mobile, etc), and then go from there. Go through something like Murach's Beginning Java with Eclipse as Eclipse is a rather well known IDE that I use to code Java with at work. I've used different flavors of it for a number of languages, but bygones. You might want to look into learning Java Spring after that. Again, it is vastly up to you based on what direction you pick.
6 years ago
I went and cleaned up more than I thought I should have since the base of this was from a previous assignment, but it seems to be working fine now. Thanks.
8 years ago
I got the write to work.



In terms of the read, it outputs this: "brownm23.Contact@2fc14f68" which is the project and contact class name along with some other stuff. readContacts returns an array.
8 years ago
Basically head desked when I read the question about making it not null. It now goes through the process of writing the objects to a file, but I can't find the file afterwards.
8 years ago
Odd, I thought I might have removed some code that I posted which might change some numbers, but it looks the same as I'm running, and I get the same error message. It trips up for me here:



If it makes it past there, then I am confused.
8 years ago
Add in contacts and then try to write them to a file. I forget to mention what I was trying to do.
8 years ago
Exception in thread "main" java.lang.NullPointerException
at brownm23.ContactBook.save(ContactBook.java:40)
at brownm23.ContactApp.main(ContactApp.java:97)
Java Result: 1
8 years ago
I'm getting a NullPointerException run I run my code. The data being passed isn't null. The only thing itself that is would be the ContactFileManager object. Since that class has no variables, I'm wondering how can I get past the exception.








8 years ago
After a lot of hemming and hawing by the professor I finally got him to admit that I don't have to pass the data via a Scanner even though the spec says to.
8 years ago
Oh, I know. It was the reason why it took so long to figure out what I was suppose to be doing as it felt needless the way it was hinted at. If I knew how to store scanner data across multiple lines within the scanner itself, it would be more straightforward.
8 years ago
I fixed the error. The lack of List is due to this being for a class and us not supposing to know how to use one just yet. The scanner being past is part of the requirement. I tried for the life of me to figure out why it was done that way based on the specs and the best I came up with was if it was an array, but I couldn't find a way to do it, so I just passed a scanner object. I'll ask for clarification once I know the rest is working.
8 years ago
Error comes up when I try to add a contact via the ContactBook.add() function.





8 years ago
Should be working in this version.



8 years ago
Since I haven't gotten a clean compile I wasn't able to pick up the logic error in needing to switch in the "-+" code. Direction is a String type as per assignment as enums haven't been taught yet. :P
8 years ago
Solved the issues with the Grid class by merely trying to explain it. Maybe a weekend away helped for it to click. For the GridApp, the error is pointing to the box part of the statement as it is set to private. While I get that, I guess I don't understand the instruction to "get the box from the grid, and push it." Since the "g.getBox();" code returns the box from the grid, I wonder if I'm suppose to set it to something although I'm not sure what. I don't think I'm suppose to create a new box and I don't know how to call the push function from the grid's box's push function.

And thanks.
8 years ago