Futurecraft Forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Futurecraft Forums

A forum dedicated to communication and innovation!
 
HomeLatest imagesSearchRegisterLog in
Welcome, one and all, to the Futurecraft Forums!

 

 Tonyri's Learning Java Development Log

Go down 
+2
fr0stbyte124
tonyri
6 posters
AuthorMessage
tonyri
Newbie
Newbie
tonyri


Posts : 126
Join date : 2011-09-04
Age : 28
Location : Wisconsin, USA

Tonyri's Learning Java Development Log Empty
PostSubject: Tonyri's Learning Java Development Log   Tonyri's Learning Java Development Log Icon_minitimeSat Dec 17, 2011 10:15 pm

I already have a thread about this, but I feel it would be nice to post my learning progress on the forums here. It would also keep me motivated not to quit. So far, after a few hours of learning basics and downloading tutorials, I have managed to make this code:

Code:
public class Variables
{
    public static void main(String[] args)
    {
      int test = 8;
      System.out.println(test);
    }
}   


I don't know really what most of the terms mean, but it worked, so that's really what matters. I know that
Code:
int
means that the I named "test" is a number without decimals, and the
Code:
System.out.println(test);
tells the computer to write out 8. I know that ; ends a line of code. My head already hurts from the odd terminology.
Back to top Go down
fr0stbyte124
Super Developrator
Super Developrator
fr0stbyte124


Posts : 1835
Join date : 2011-10-13

Tonyri's Learning Java Development Log Empty
PostSubject: Re: Tonyri's Learning Java Development Log   Tonyri's Learning Java Development Log Icon_minitimeSun Dec 18, 2011 2:41 am

Yep that looks good.
FYI int stands for integer. Variables with decimals are called floating-point and are defined with "float" and "double". Double has much greater precision, using 32 bits vs float which uses only 16 bits.
Also System.out.println() is a nice method because it figures out what you are trying to print and will parse it correctly without you having to do anything special.
Back to top Go down
tonyri
Newbie
Newbie
tonyri


Posts : 126
Join date : 2011-09-04
Age : 28
Location : Wisconsin, USA

Tonyri's Learning Java Development Log Empty
PostSubject: Re: Tonyri's Learning Java Development Log   Tonyri's Learning Java Development Log Icon_minitimeSun Dec 18, 2011 7:15 pm

I just learned how to make loops. Here is my code:
Code:
public class test
{
    public static void main(String[] args)
    {
      int x = 5;
      while(x<20)
        {
            System.out.println(x);
            x=x+1;
        }
    }
}
I set it to start at 5 and keep going up by one until it got to 20.
Back to top Go down
GroundBurg_Coder13
Newbie
Newbie
GroundBurg_Coder13


Posts : 59
Join date : 2011-08-31

Tonyri's Learning Java Development Log Empty
PostSubject: Re: Tonyri's Learning Java Development Log   Tonyri's Learning Java Development Log Icon_minitimeSun Dec 18, 2011 11:47 pm

yup, also for the x = x +1; you can use x++ which adds 1 to x every time it loops ( or x += 1, which is the same thing), and for the while statement, there is also the for() statement which is also a loop, if you want to look it up.
Back to top Go down
ectrimble20
DEV
DEV
ectrimble20


Posts : 441
Join date : 2011-11-07

Tonyri's Learning Java Development Log Empty
PostSubject: Re: Tonyri's Learning Java Development Log   Tonyri's Learning Java Development Log Icon_minitimeMon Dec 19, 2011 12:54 am

just to add onto what GroundBurg said, a fancy thing to remember about ++ increments is that they will be done where you put them in the code, by this I mean they can be a pre or a post counter.

For instance:

int x = 2

If you do this:

x++
System.out.println(x)

You'll get 3, but if you do this

System.out.println(x)
x++

You'll get 2.

The reason I mention this is that it can be crucial to other aspects of your code when the number changes.

Anyway, just a pointer from someone who's fought that battle before.

As for the for statement, its generally written as so:

for(int x = 0; x < 10; x++)

this will loop until x is greater than 10. Same basic principal as the while loop, but it handles the increment for you.

Keep at it!
Back to top Go down
Apokalypse
Newbie
Newbie



Posts : 33
Join date : 2011-12-21

Tonyri's Learning Java Development Log Empty
PostSubject: Re: Tonyri's Learning Java Development Log   Tonyri's Learning Java Development Log Icon_minitimeWed Dec 21, 2011 1:20 am

where exactly are you learning java ive been looking forever for a decent tutorial. i started learning Darkbasic but im not very good at programming atm
Back to top Go down
ectrimble20
DEV
DEV
ectrimble20


Posts : 441
Join date : 2011-11-07

Tonyri's Learning Java Development Log Empty
PostSubject: Re: Tonyri's Learning Java Development Log   Tonyri's Learning Java Development Log Icon_minitimeWed Dec 21, 2011 1:23 am

Oracle's Java Tutorials

I use these for finding information about what I'm doing and for really detailed explanations of all the magical BS that takes place with Java.
Back to top Go down
Apokalypse
Newbie
Newbie



Posts : 33
Join date : 2011-12-21

Tonyri's Learning Java Development Log Empty
PostSubject: Re: Tonyri's Learning Java Development Log   Tonyri's Learning Java Development Log Icon_minitimeWed Dec 21, 2011 1:27 am

you're a lifesaver.
Back to top Go down
fr0stbyte124
Super Developrator
Super Developrator
fr0stbyte124


Posts : 1835
Join date : 2011-10-13

Tonyri's Learning Java Development Log Empty
PostSubject: Re: Tonyri's Learning Java Development Log   Tonyri's Learning Java Development Log Icon_minitimeWed Dec 21, 2011 1:42 am

I found this thread on the minecraft forums to be invaluable. It's geared toward those who already have a programming background, but it's got great info on Java's inner workings and how to leverage the best performance out of it. So if you're just starting out, don't worry about it. I just figured I'd share while we were on the topic.
Back to top Go down
ACH0225
General
General
ACH0225


Posts : 2346
Join date : 2012-01-01
Location : I might be somewhere, I might not.

Tonyri's Learning Java Development Log Empty
PostSubject: Re: Tonyri's Learning Java Development Log   Tonyri's Learning Java Development Log Icon_minitimeWed Jan 04, 2012 1:31 am

I have been considering learning some sort of coding myself, bit then I realized, coding is like math(correct me if I'm wrong), and I very much dislike math, it confuses me. I understand math is a necessary thing, but I avoid it when possible. I can understand a complex book, how a car engine works, but math stumps me. And....... I'm out of fuel for my rant
Back to top Go down
fr0stbyte124
Super Developrator
Super Developrator
fr0stbyte124


Posts : 1835
Join date : 2011-10-13

Tonyri's Learning Java Development Log Empty
PostSubject: Re: Tonyri's Learning Java Development Log   Tonyri's Learning Java Development Log Icon_minitimeWed Jan 04, 2012 1:44 am

Depending on what you are doing there could be a lot of very difficult math or very little math of any sort. Programming is mostly logic by itself, and you get better at thinking in those terms the more you do it. There's plenty you can do with programming even if you are bad at math, though I have no idea what you are interested so I couldn't advise any more specifically.
Back to top Go down
ACH0225
General
General
ACH0225


Posts : 2346
Join date : 2012-01-01
Location : I might be somewhere, I might not.

Tonyri's Learning Java Development Log Empty
PostSubject: Re: Tonyri's Learning Java Development Log   Tonyri's Learning Java Development Log Icon_minitimeWed Jan 04, 2012 2:07 am

fr0stbyte124 wrote:
Depending on what you are doing there could be a lot of very difficult math or very little math of any sort. Programming is mostly logic by itself, and you get better at thinking in those terms the more you do it. There's plenty you can do with programming even if you are bad at math, though I have no idea what you are interested so I couldn't advise any more specifically.
I am pretty good at logic puzzles, but I don't know what I would do with any programming skills… Nothing, probably
Back to top Go down
ectrimble20
DEV
DEV
ectrimble20


Posts : 441
Join date : 2011-11-07

Tonyri's Learning Java Development Log Empty
PostSubject: Re: Tonyri's Learning Java Development Log   Tonyri's Learning Java Development Log Icon_minitimeWed Jan 04, 2012 11:49 am

Well like I tell anyone interested in learning Java, look up those tutorials that I posted. Check out that post Frost linked to. You can't learn something if you let it beat you before you've even started.

I can tell you from experience that learning programming languages can be rough.

I learned HTML when I was 13, Perl when I was 15, PHP when I was 16, threw some SQL in there around 17. By the time I was 20 I had dabbled in everything from QBasic to C++ back to HTML, CSS, and all kinds of stuff.

And also remember this, and this is very important: You don't need to know everything about a language, but you do need to know how to find out how to do what you're trying to do.

Basically what that means is that Google is your best friend. I don't know everything about all the languages I work in, but I sure as hell know how to find how to do what I'm trying to do.

Anyway, I kinda went off on a tangent there, didn't mean to babble on, just trying to give you some perspective as to what goes into learning how to program.

Back to top Go down
Sponsored content





Tonyri's Learning Java Development Log Empty
PostSubject: Re: Tonyri's Learning Java Development Log   Tonyri's Learning Java Development Log Icon_minitime

Back to top Go down
 
Tonyri's Learning Java Development Log
Back to top 
Page 1 of 1
 Similar topics
-
» Interesting new development
» The Lord of Error's learning Java log
» Application for beta tester
» Fr0stbyte's Development Log
» caltech117 development log

Permissions in this forum:You cannot reply to topics in this forum
Futurecraft Forums :: General Area :: Off-Topic Area-
Jump to: