SRL Archive - Java Help and Tutorials

Math skills for Java?


Esteban

2007-07-26 23:45:00

Well, I will be taking a Java course my Senior year of high school, but i must wait until then because it is required that you taking/have had a year in calculus to be able to join the class. Is there really that much math to Java?

Bobarkinator

2007-07-27 02:57:14

I haven't scripted a ton with Java but from my experience you don't use a lot of math. You should ask Ben as he has done more stuff with Java.

LordGregGreg

2007-07-27 03:22:18

it depends on what you are doing. For an entry level course, you wont need any calculus. Depends on what you are doing though, you can make stuff as complex and math oriented as it needs to be. Drawing functions are very math oriented… etc.

~alex~

2007-07-27 18:32:37

What is calculus? Like differentiation and integration and stuff like that?

bullzeye95

2007-07-27 19:25:10

Calculus = a kind (or level?) of math.

LordGregGreg

2007-07-27 20:33:18

From: ~alex~
What is calculus? Like differentiation and integration and stuff like that?

for the most part, yes.

my calc class went over a few other basic things that are nice to know too.

~alex~

2007-07-28 06:38:13

We've done integreation and differentiation, and even went over what the curriculum asks us to do lol. They say the extra stuff we done is too advanced :| It really isnt hard and I think people only think its hard because people have told them it is..

LordGregGreg

2007-07-28 11:45:35

From: ~alex~
We've done integreation and differentiation, and even went over what the curriculum asks us to do lol. They say the extra stuff we done is too advanced :| It really isnt hard and I think people only think its hard because people have told them it is..

Well, i kinda disagree. I have been through everything up to coledge diferential equations class, and trust me. You think you know how to integreate, and diferetiate, but cha dont! It gets really tricky, especially when it comes to integration. Sure, the simple stuff is easy, but it gets rough fast!

Esteban

2007-07-28 23:29:42

Bah! So i'm probably best off learning java at someplace like mopar. What languages (prgramming) shold be known before java?

Smartzkid

2007-07-28 23:36:25

Java's fine for a starter language, and, since you already know pascal, you have an extra advantage!

I took 'Intro to Java' my freshman year; it was pretty simple, but we didn't get into gui stuff much. Swing inputboxes was the furthest I got.

LordGregGreg

2007-07-28 23:51:24

Java is a very good starting language. I had a head start with some ti83 programming, lol. But yeah, I know about 20+ languages now, and they all are very similar to java.

rkroxpunk

2007-07-29 10:42:29

and apparently C++ is a lot like Java which is meant to be one of the best programming languages…I want to be a programmer when i'm older but I really don't know if i have the brains…:S

~alex~

2007-07-29 20:50:58

C++ is considered alot more difficult than Java and probably wouldn't be such a good starter language..

Smartzkid

2007-07-30 18:19:51

If you already know SCAR, any high-middle language shouldn't be too hard to adapt to.

Esteban

2007-08-01 12:20:17

any preferred places to jearn JAVA? I was briefly looking though, and the SUN JAVA wesite seems to have great tutorials.

Bobarkinator

2007-08-01 15:59:30

http://www.sean.cruels.net/java/

Best java tut I've ever seen, also what taught me java.

gam3r

2007-08-12 05:15:29

Noboddy fuck me

LordGregGreg

2007-08-12 09:59:27

From: gam3r
Noboddy fuck me


Hi and welcome to the forums. You really can relx here, no one is trying to f you :).

But please, try to make your posts relevant to the thred title :) or a t least clue us in. tHANKS :)

hellsfire

2007-08-14 04:42:00

well i think i can learn Java but school they all say is important and at each turn they all said if i got up off my lazy butt i could blow threw all 4 years of high school in 12 months but unleashing my madness on unsuspecting people is mean
and my reading level is as high as the tests they got go for my age=14.
but i think i can make them wait i wanna spend some time programing.:p

BenLand100

2007-08-14 08:09:19

I'm not sure why all programming classes have high math requirements. What they are trying to do is weed out all of the stupid people that can't understand command flow, boolean logic, and the analytical part of programming. You won't really ever do much math beyond simple calculations and random numbers unless the specific program requires it. Plus, derivatives and integration are easier [and faster] to approximate on a computer than to do in real life. Take this for example, its what I wrote for inverse trig functions before scar had them included.
type funct = function (x: extended): extended;

function simpsons_rule(f: funct; a, b: extended): extended;
var
c, h3: extended;
begin
c:= (a + b) / 2.0;
h3:= abs(b - a) / 6.0;
result:= h3 * (f(a) + 4.0 * f(c) + f(b));
end;

function recursive_asr(f: funct; a, b, err, sum: extended): extended;
var
c, left, right: extended;
begin
c:= (a + b) / 2.0;
left:= simpsons_rule(f, a, c);
right:= simpsons_rule(f, c, b);
if (abs(left + right - sum) <= 15 * err) then
begin
result:= left + right + (left + right - sum) / 15;
exit;
end;
result:= recursive_asr(f, a, c, err / 2, left) + recursive_asr(f, c, b, err / 2, right);
end;

function integrate(f: funct; a, b: extended): extended;
begin
result:= recursive_asr(f, a, b, 0.000000000001, simpsons_rule(f, a, b));
end;

function aTan_prime(x: extended): extended;
begin
result:= 1 / (1 + x * x);
end;

function aCos_prime(x: extended): extended;
begin
result:= -1.0 / Sqrt(1.0 - x * x);
end;

function aSin_prime(x: extended): extended;
begin
result:= 1.0 / Sqrt(1.0 - x * x);
end;

function aTan(x: extended): extended;
begin
result:= integrate(@aTan_prime, 0.0, x);
end;

function aCos(x: extended): extended;
begin
if (x = -1.0) then
result:= aTan(1) * 4;
if (abs(x) <> 1) then
result:= integrate(@aCos_prime, 0.0, x) + (aTan(1) * 2);
end;

function aSin(x: extended): extended;
begin
result:= x * (aTan(1) * 2)
if (x <> 1) and (x <> 1.0) then
result:= integrate(@aSin_prime, 0.0, x);
end;

Esteban

2007-08-15 09:23:36

One word Ben: Huh?

Well, if someone doesn't mind, could someone post how to successfully install all programs needed to write and execute a JAVA script? I know there is a tutorial here, but i can't follow it very well.

R0b0t1

2007-08-17 22:31:29

Its not a script, its (I think) officially an application. You can make scripts with JavaScript.

Oh, and the JDK is on the sun website as JDK 6 (or 1.6.0).

To compile a .java file to a .class go to CommandPrompt and type "javac PATHOFFILE". If it compiles correctly, you can type "java PATHOFCLASSFILE" should work.

If you're looking for an free IDE, eclipse is listed above netbeans on google, but yahoo says netbeans is better, ans ask.com says Jetbrains is first, then netbeans, the blueJ, then eclipse.

You choose one.

Light

2007-09-07 04:15:53

I agree with Ben, there's no reason to have Calculus unless you're trying to make a program that involves calculus. I agree with Ben again that they're just trying to weed out people. I agree with Ben on everything he said…

He's a smart guy, listen to him.

Here's a list I found of some IDEs
http://en.wikipedia.org/wiki/List_of_integrated_development_environments#Java

Edit: I know of schools that will teach Java using JCreator, but I think it's pretty bad. If you want to get a head start on your class, maybe ask what they use. Ask if they'd be able to give you a copy (if it's not free).

Miitchyy

2007-09-14 20:18:50

I use textpad mainly because I'm sort of anti IDE because they lag my computer too bad.

IDE's are ALOT LOT LOT LOT easier though because I know NetBeans has CTRL+SPACE which is useful and it can make forms easier

Wizzup?

2007-09-15 04:10:22

Everyone can take code from wiki and then afterwards code it in SCAR, Ben. ;)

Bobarkinator

2007-09-18 21:34:27

Ben just seems like a person who would do that :p