Learning Java...

Discuss how to write good code, break bad code, your current pet projects, or the best way to approach novel problems

Re: Learning Java...

Post by eljonto on Sun Mar 07, 2010 3:48 am
([msg=36247]see Re: Learning Java...[/msg])

C's if control statements are if/else if/else, same as Java. VB.net uses If /Then
-Quis custodiet ipsos custodes?, Juvenal
_________________________________________________________________
User avatar
eljonto
Poster
Poster
 
Posts: 373
Joined: Thu Apr 17, 2008 1:16 am
Location: Australia
Blog: View Blog (0)


Re: Learning Java...

Post by UNL2009 on Wed Mar 10, 2010 12:01 pm
([msg=36459]see Re: Learning Java...[/msg])

sanddbox wrote:Woops, missed that. tgeo is correct- you compare with the == operator. His code would set the variable data to 5.

no.
Code: Select all
if(data=5)
would not assign 5 to data...it would give you a compile error because if conditions only test booleans, and can't assign anything in their test.

OP, get McGraw-Hill's An Introduction to Object-Oriented Programming with Java It does wonders.
UNL2009
New User
New User
 
Posts: 22
Joined: Sun Sep 07, 2008 2:32 pm
Blog: View Blog (0)


Re: Learning Java...

Post by Pagerops on Thu Mar 11, 2010 2:38 pm
([msg=36538]see Re: Learning Java...[/msg])

UNL2009 wrote:
sanddbox wrote:Woops, missed that. tgeo is correct- you compare with the == operator. His code would set the variable data to 5.

no.
Code: Select all
if(data=5)
would not assign 5 to data...it would give you a compile error because if conditions only test booleans, and can't assign anything in their test.

OP, get McGraw-Hill's An Introduction to Object-Oriented Programming with Java It does wonders.

Will do!
User avatar
Pagerops
New User
New User
 
Posts: 21
Joined: Wed Jul 09, 2008 2:29 pm
Blog: View Blog (0)


Re: Learning Java...

Post by Acidr4in on Fri May 07, 2010 9:45 am
([msg=38417]see Re: Learning Java...[/msg])

This is my first post, ive recently been learning Python as my first language, just because of the simple syntax but im being swayed to try and learn either C++ or Java aswell ( havnt chosen yet) any opinions on whats i should choose?.
Here's a link to some pretty awesome tutorials on utube on java , he also does C++,Python and loads more to those of you who prefer video. I learnt most of my stuff from this guy.
http://www.youtube.com/watch?v=gtQJXzi3 ... playnext=2 :D
Acidr4in
New User
New User
 
Posts: 1
Joined: Fri May 07, 2010 9:38 am
Blog: View Blog (0)


Re: Learning Java...

Post by UNL2009 on Fri May 21, 2010 9:45 am
([msg=38868]see Re: Learning Java...[/msg])

I'd go with Java first. Its easier to get the hang of. However, they made it almost too easy... you don't really get to learn what goes on past the code (unless you specifically look...). I started with C. Its difficult to grasp some concepts and first, and I believe the learning curve is a bit steeper, but you'll in turn learn more about what goes on underneath the code.

Have fun :D
UNL2009
New User
New User
 
Posts: 22
Joined: Sun Sep 07, 2008 2:32 pm
Blog: View Blog (0)


Re: Learning Java...

Post by ProjektTHOR on Fri May 21, 2010 10:37 am
([msg=38870]see Re: Learning Java...[/msg])

I wouldn't say that Java is the easiest to learn. Maybe I say this because Java wasn't my first language, but I feel like I had an easier time with perl, php, and python.

I think the main reason Java is used as an educational tool is its a de facto standard for a lot of applied web programming because of its portability. You want to teach students things they can actually use and deploy, and Java is generally speaking the easiest.

I mean, lets be honest: The high-level languages aren't all that different. That's the joy of them being high-level. The only thing more simple than it is natural language programming. :p

Anyway, just my $0.02
ProjektTHOR
New User
New User
 
Posts: 18
Joined: Thu May 20, 2010 11:43 am
Blog: View Blog (0)


Re: Learning Java...

Post by FunctionCreep on Fri May 21, 2010 10:26 pm
([msg=38896]see Re: Learning Java...[/msg])

Something that helped me while I was learning java was NOT to use Netbeans or Eclipse etc. etc. the functions hints & autocompletion can be great when you are trying to shell out something fast but can greatly confuse you especially if you are new to programming. You may need to type a bit more but it'll help you get the feel of how a program "flows". http://www.textpad.com/ is pretty nice editor if you're using windows or anything else will do if you're using a *nix based system. Can't remember the name of the editor that I used in mac os unfortunately since that unfortunate period was small. 8-)

http://java.sun.com/j2se/1.3/docs/api/index.html <--- is your friend!

As to why Java is being used in institutions etc. , most jobs out in the field require you to know at least Java for reasons already mentioned. Also many academics praise Object Oriented (OO) programming (that is up to debate ofcourse) and probably it's one of the reasons it is so widespread taught.

And remember to have fun while learning :)
"I hope for nothing. I fear nothing. I am free." ~ Nikos Kazantzakis
User avatar
FunctionCreep
Experienced User
Experienced User
 
Posts: 92
Joined: Tue May 18, 2010 6:19 pm
Blog: View Blog (0)


Re: Learning Java...

Post by Huggles on Fri May 21, 2010 10:51 pm
([msg=38897]see Re: Learning Java...[/msg])

I wouldn't say that Java is the easiest to learn. Maybe I say this because Java wasn't my first language, but I feel like I had an easier time with perl, php, and python.

I think the main reason Java is used as an educational tool is its a de facto standard for a lot of applied web programming because of its portability. You want to teach students things they can actually use and deploy, and Java is generally speaking the easiest.

I mean, lets be honest: The high-level languages aren't all that different. That's the joy of them being high-level. The only thing more simple than it is natural language programming. :p

Anyway, just my $0.02


Well yeah, a scripting language is designed to be easy XD. I think hes saying he has a scripting language under his belt and wants to learn a more powerful language for tasks that require it, in this case from python, Java would be the easiest transition due to the similar OOP style. (but I'm bias ;P)
Huggles
New User
New User
 
Posts: 4
Joined: Thu Apr 15, 2010 10:07 pm
Blog: View Blog (0)


Re: Learning Java...

Post by ProjektTHOR on Sat May 22, 2010 8:12 am
([msg=38910]see Re: Learning Java...[/msg])

Agreed, Python -> Java is a good bridge. It's probably the only reason I had any success in Java.

And yes yes yes yes yes remember what was said: Have fun learning. You're trying to learn something outside of a typical educational environment (read: forced). Sometimes learning it procedurally by the book is not the best idea. Find something easy you would like to create using java and create it.

Task-based learning is always more efficient, in my experience. Give someone (or yourself) a goal and develop the skills to complete it. Seems to be the point of HTS.
ProjektTHOR
New User
New User
 
Posts: 18
Joined: Thu May 20, 2010 11:43 am
Blog: View Blog (0)


Re: Learning Java...

Post by Pagerops on Thu Oct 07, 2010 1:10 am
([msg=47171]see Re: Learning Java...[/msg])

ProjektTHOR wrote:Agreed, Python -> Java is a good bridge. It's probably the only reason I had any success in Java.

And yes yes yes yes yes remember what was said: Have fun learning. You're trying to learn something outside of a typical educational environment (read: forced). Sometimes learning it procedurally by the book is not the best idea. Find something easy you would like to create using java and create it.

Task-based learning is always more efficient, in my experience. Give someone (or yourself) a goal and develop the skills to complete it. Seems to be the point of HTS.



So meaning that python would be a better place to start, and then move to java once I have a better understanding of that? Cause for awhile now I've been trying to work with java and its only managed to confuse the hell out of me. I understand what its doing but putting it from my mind into the code just give me a hard time. HTML was like that when i started but I eventually got a hold of it but that was a padded pain in the posterior.
User avatar
Pagerops
New User
New User
 
Posts: 21
Joined: Wed Jul 09, 2008 2:29 pm
Blog: View Blog (0)


PreviousNext

Return to Programming

Who is online

Users browsing this forum: No registered users and 0 guests