I've just transferred from a music degree to a computer science degree and am starting next semester.
One of my core units is learning the fundamentals of coding in Java and professional practice. I don't start for another month and a half so I am wanting to get a head start on things, out of interest.
Could anyone recommend me any sites/books/information that would be best for someone who is only just starting out with programming and assumes they know nothing about Java at present? I am currently using Eclipse IDE and just learning some very basic things like typing out a string and messing around with different data types. Currently learning to code using booleans.
The Java API docs on Oracle's site are a good reference. Learning how to read the documentation can be one of the most valuable skills getting started. You'll need an understanding of a few basic programming concepts like methods, parameters, classes, and types to get much out of it, but once you get how to use them, the docs are an invaluable resource. For example, if I wanted to know what methods the String class provides, I'd search google for "java string" (without quotes) and click the link to docs.oracle.com.
I see that you're also doing a computer science degree. I've only just realised, after enrolling and being accepted into the degree, that it's extremely maths-based. I haven't done any maths since high school, and even then I didn't do any 3 or 4 unit mathematics.
What topics of maths are tied closely to computer science? I'm doing 2 units of maths next semester that involve differential equations, integral calculus, statistics and so on... do you know any good sites that will help me get back up to date with my maths?
I'm planning on doing a double major, CS and Math. I won't pretend to have a good idea of what parts of math are related to computer science- I pretty much assume most if not all of it applies in some fashion or another. Linear algebra I know is important in a lot of areas, and I'm also aware of some obscure things that have niche applications, like quaternions. I'm not very far along in my college path yet; only finishing up my AS this summer semester. Some good places to brush up on math though might be MIT OpenCourseWare and Khan Academy.
Effective Java by Joshua Bloch is highly recommended. I have it but haven't started learning Java yet so can't offer any personal experience regarding the book, I just know it's highly recommended by those in the know, so I bought it.
I was taught Java in the first year of my networking degree with the object oriented part taught last, which worked quite well for me:
Simple print statements
Primitvate data types and casting
Flow control using if-statements, while loops, do while loops, and for loops
Using methods to make code more modular
Strings and string manipulation and Arrays
Java classes and interfaces
Event listeners and GUIs
Low level sockets and threads
Since it's a networking degree and not Computer Science, inheritence wasn't exactly covered, but I taught this myself. In second year we moved on to building web applications using JSP and Java Beans.
That seems pretty similar to the outline of my Java unit. I'm doing a computer science degree, but majoring in networking. Java just happens to be the compulsory unit to learn. There are options for later down the track in c++ too, which I'll most likely take on.
Just had a quick look at it, and the author says that the book is intended for those who are already comfortable with the Java language and coding in Java - not for beginners. Was the book recommended to you assuming you have no experience with Java? I'm not sure if it could be of use to me at present.
Every C programm is a valid C++ Programm, but in C++ you are also able to programm in an object oriented way. (But you don't have to - although this would be a missuse of C++ (why not take C in this case?)) - As far as i now (stared learning java for fun since yesterday with a course in my university) Java can be similar to C++ but forces you to think/write in an oop-style. So no oldschool "sript-like" programms like C in Java!
In fact the syntax of C++ is an extended Version of C (thats why every C program is a valid C++ program). C is a classical procedural language, right. But this extension of C++ doesen't mean that it is OO only. :) They just included the tools to use it as such.
No, the book wasn't recommended to me personally as a beginner, I just was looking for the best book on Java, and saw posts on various forums describing Effective Java as the best book written on the subject and it being a resource that finally let people understand Java deeply. I'm taking intro Java in college this summer so I'll be using it as a supplementary text to whatever book is used in the class. As far as beginner books, I have no idea what to recommend.
C, C++, C#, and Java are very VERY similar. They belong to what I call (dunno if this a real term) the C Family, because they were all designed off of C when the languages were made. Took my intro to Java class in college and got an A with only having to look up 2 things:
1) What the hell is a "Scanner"?
2) Random in Java
For the most part, everything else is the same.
P.S. I had previous experience with C# and a bit of C/C++
For a computer science degree, the most important math falls into what they call discrete math, which includes probabilities and combinatorics, matrices, recurrence relations, graph theory, logic, and probably some other stuff I'm forgetting. All of those are directly tied into computer science and programming. Calculus and statistics are more tangentially related, but still important, and may not be required, depending on the program.