What I already know should be sufficient:
Packages and classes
types and identifiers
classes and objects
control structures
inheritance and polymorphism
the standard classes (object,string,math..)
Mohamed Sanaulla  My Blog  Author of Java 9 Cookbook
If you read a book like Head First Java, that will give you lots of ideas with its examples. My preferred way is to read through what they did, then go and try to program the same thing myself without looking back at how they did it, unless I get really stuck.
Project Euler also has a TON of programming problems. Granted, they require some complicated math, but the programs themselves can be rather simple.
There are only two hard things in computer science: cache invalidation, naming things, and offbyone errors
fred rosenberger wrote:Our own CattleDrive has many assignments you can try for free. If you want them nitpicked by a staffer there is a cost, but there is no reason you couldn't read and try them on your own.
Project Euler also has a TON of programming problems. Granted, they require some complicated math, but the programs themselves can be rather simple.
Good links, thanks  I might try a few of these.
I'm looking at some of the Project Euler ones but what I find slightly offputting is knowing how much is supposed to be testing my maths and how much my coding prowess. Like some of the physicstype problems, if you had them in an exam you know there's going to be an analytic solution, but for example:
A firecracker explodes at a height of 100 m above level ground. It breaks into a large number of very small fragments, which move in every direction; all of them have the same initial velocity of 20 m/s.
We assume that the fragments move without air resistance, in a uniform gravitational field with g=9.81 m/s2.
Find the volume (in m3) of the region through which the fragments move before reaching the ground. Give your answer rounded to four decimal places.
Seems like something you could solve by geometry + calculus... or should I ditch the equations and just go for a numerical simulation?
Luigi Plinge wrote:Seems like something you could solve by geometry + calculus... or should I ditch the equations and just go for a numerical simulation?
I'm not sure what they're expecting, as I've never really looked at Project Euler...but it might be an interesting exercise to do both. Go for a simulation, and compare it to the analytical result.
Note that in most cases the more 'geometry + calculus' you use, the less time it takes for your program to find the solution.
The mind is a strange and wonderful thing. I'm not sure that it will ever be able to figure itself out, everything else, maybe. From the atom to the universe, everything, except itself.
Crikey, that was difficult, but kinda fun.
Not too difficult to get an approximate answer, but getting it to 4 decimal places (11 significant figures!) in a reasonable amount of time was more of a challenge.
Pretty sure it's not possible to do without a computer... after poring over the equations for a couple of hours I ended up with a very long and ugly partial differential equation that looks unsolveable (although it's dimensionally correct).
If anyone wants to have a go and discuss solutions, let me know. Maybe we should have a Project Euler thread / forum here on JavaRanch.
http://www.youtube.com/view_play_list?p=84A56BC7F4A1F852
Hope it helps!
It's a pleasure to see superheros taking such an interest in science. And this tiny ad:
The WEB SERVICES and JAXRS Course
https://coderanch.com/t/690789/WEBSERVICESJAXRS
