Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
18 May, 2013, 21:52:17 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: [1]   Go Down
  Print  
Author Topic: Looking for info...about java -  (Read 809 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
squidgetx
Food.
Coder Of Tomorrow
LV10 31337 u53r (Next: 2000)
*
Offline Offline

Gender: Male
Last Login: 28 April, 2013, 23:50:38
Date Registered: 30 May, 2010, 19:54:18
Location: eating somewhere
Posts: 1829


Topic starter
Total Post Ratings: +476

View Profile
« on: 07 March, 2011, 23:13:43 »
0

What kind of language is Java? I've heard various phrases tossed around, like "object oriented," etc. And, as a low-level programmer highly proficient in something like Axe, would it be easy or hard to pick up?
Logged

Read my webcomic! | My SoundCloud
Projects:

Check out the demo now!- Current progress: battle engine and stuff
Proud author of: Cuberunner | SpaceDash | The Psyche | XXEdit | AxeSynth | StickNinja | Gravity Guy | Embers:Phoenix | Zombie Gun
Axe: Need help optimizing?
User of Axe | zStart | TokenIDE | CalcGS | MirageOS
Munchor
LV13 Extreme Addict (Next: 9001)
*************
Offline Offline

Gender: Male
Last Login: 07 May, 2013, 22:49:01
Date Registered: 16 October, 2010, 15:39:13
Location: Position
Posts: 6209


Total Post Ratings: +174

View Profile
« Reply #1 on: 07 March, 2011, 23:21:47 »
0

What kind of language is Java? I've heard various phrases tossed around, like "object oriented," etc. And, as a low-level programmer highly proficient in something like Axe, would it be easy or hard to pick up?

It's easy to pick up if you have experience in other OOP languages.

Object Oriented Programming is like:


1
2
3
4
str1 = "hey"
a = str1.length()
#a = 3
The upper code is python, but OOP is when you access object properties.

A property of a string can be its length, it's number of words, it's position (GUI), it's size (GUI).

Objects have an enormous number of properties and methods.

Take a look at this Java method:


1
2
3
JButton button = new JButton(); //This creates a button
button.setVisible(true); // setVisible() is a method, and I set it to true in order to show the button


Explaining OOP is hard, here's a Python example:



1
2
3
4
a = "hello"
print len(a)  # This is non-OOP
print a.__length__  #This is OOP
This last example is what made me understand OOP, I'll never forget it.

If you have experience in Python (and I know you do), you'll find Java more OOPy and easier to handle when it comes to GUI.

The inheritance is DAMN hard to get, but when you get it, you'll like it.
« Last Edit: 07 March, 2011, 23:22:18 by Scout » Logged
squidgetx
Food.
Coder Of Tomorrow
LV10 31337 u53r (Next: 2000)
*
Offline Offline

Gender: Male
Last Login: 28 April, 2013, 23:50:38
Date Registered: 30 May, 2010, 19:54:18
Location: eating somewhere
Posts: 1829


Topic starter
Total Post Ratings: +476

View Profile
« Reply #2 on: 07 March, 2011, 23:24:20 »
0

I have no experience with Python or any other higer-level language save TI-BASIC Big smile
Logged

Read my webcomic! | My SoundCloud
Projects:

Check out the demo now!- Current progress: battle engine and stuff
Proud author of: Cuberunner | SpaceDash | The Psyche | XXEdit | AxeSynth | StickNinja | Gravity Guy | Embers:Phoenix | Zombie Gun
Axe: Need help optimizing?
User of Axe | zStart | TokenIDE | CalcGS | MirageOS
apcalc
The Game
Coder Of Tomorrow
LV10 31337 u53r (Next: 2000)
*
Offline Offline

Gender: Male
Last Login: 12 May, 2013, 20:31:24
Date Registered: 20 March, 2010, 16:31:47
Location: 2003 UB313
Posts: 1393


Total Post Ratings: +118

View Profile
« Reply #3 on: 07 March, 2011, 23:25:30 »
0

I used this textbook to learn Java, and using it has made me proficient enough to do good on the AP Computer Science Test:

http://math.hws.edu/javanotes6/
Logged


Munchor
LV13 Extreme Addict (Next: 9001)
*************
Offline Offline

Gender: Male
Last Login: 07 May, 2013, 22:49:01
Date Registered: 16 October, 2010, 15:39:13
Location: Position
Posts: 6209


Total Post Ratings: +174

View Profile
« Reply #4 on: 07 March, 2011, 23:27:34 »
0

I have no experience with Python or any other higer-level language save TI-BASIC Big smile

OOOh, I thought you made TI_Convert (It was Michael Lee it seems)

Ok, Java is higher than Axe, but not as high as TI-Basic (you can shut down the computer).

Wow, but at least take a look at this example if you wanna know what OOP is:


1
2
3
4
a = "Hello World"     #this makes the variable a be "Hello World", a STRING
print len(a)             # this returns (as in Disp ) the length of a
print a.__length__     # this makes the same thing as above, but it accesses a property of a, its length, Object-Oriented Programming
Also, this example is Python, not Java, in Java everything pretty much is OOP.

If you wanna learn Java, try this:

http://leepoint.net/JavaBasics/index.html

After getting enough, move on to this:

http://leepoint.net/notes-java/index.html

But starting with Java after TI-Basic/Axe is gonna be hard Smiley But you're an awesome Axe programmer, I'm sure you can do it Smiley
« Last Edit: 07 March, 2011, 23:28:49 by Scout » Logged
Madskillz
LV6 Super Member (Next: 500)
******
Offline Offline

Last Login: Today at 18:18:58
Date Registered: 10 September, 2008, 19:17:24
Posts: 494

Total Post Ratings: +32

View Profile
« Reply #5 on: 08 March, 2011, 00:19:18 »
0

Java is a fairly simple language. As you learn more and more from/about it, I think you will really like OOP. It is a higher-level language that is extremely portable and can be used in a wide variety of applications. Plus it has a built-in garbage collector for memory management. Which means you will be pretty spoiled, because a lot of higher-level languages don't have that and if they do they aren't very good. Plus with a wide variety of tutorials and all the API's provided by Sun make it a great, language to pick up for a beginner.
Logged
calcdude84se
Needs Motivation
Members
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Gender: Male
Last Login: 14 May, 2013, 16:12:14
Date Registered: 21 April, 2010, 04:20:59
Posts: 2207


Total Post Ratings: +62

View Profile
« Reply #6 on: 08 March, 2011, 01:27:30 »
0

This. Object-oriented languages are amazing.
In addition to being simple, it also has more advanced features if you need them. It's not a bad language to know, not at all Cheesy
Logged

"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Bug me about PartesOS. I might just need reminding.
nemo
LV9 Veteran (Next: 1337)
*********
Offline Offline

Last Login: 04 April, 2013, 01:12:57
Date Registered: 16 May, 2010, 03:55:30
Posts: 1198

Total Post Ratings: +83

View Profile
« Reply #7 on: 08 March, 2011, 01:49:42 »
0

java's a pretty easy language to pick up. here i'll describe the basics of OOP:
OOP is Object Oriented Programming. to start, i'd suggest to just learn about classes, objects, methods, instance variables and constructors along with how they interact. a class can be thought of a blueprint to make an object. a class contains methods (subroutines), instance variables (like A-Z+theta, except user-defined) and constructors (a special type of method used to create an object). here's a short example, labeling the parts of a class:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
class Enemy{
     private int xPos = 0; // this creates an integer instance variable "xPos" and sets it to 0
     private int yPos = 0; // because of the variables are "private", they cannot be accessed outside the class

     public Enemy(int x, int y){ //constructor. enemies have an x and y position as parameters
          xPos = x;
          yPos = y;
     }

     public int getX(){ //this is a method. it returns a type int, and has no parameters passed.
          return xPos;
     }
     public void setX(int x){ //another method, with a void return type.
          xPos = x;
     }
}

to make and manipulate a new Enemy object, you would do:

1
2
3
4
5
6
Enemy myEnemy = new Enemy(5, 10); //creates a new Enemy object called myEnemy
int x = myEnemy.getX(); //calls the method "getX()"
System.out.println(x); //prints 5
myEnemy.setX(200); // calls method "setX()"
System.out.println(myEnemy.getX()); // calls getX(), and prints the value (200)
Logged


Deep Thought
So much to do, so much time, so little motivation
Administrator
LV13 Extreme Addict (Next: 9001)
*
Offline Offline

Gender: Male
Last Login: Today at 21:12:29
Date Registered: 19 May, 2009, 08:00:00
Location: The Universe
Posts: 7812


Total Post Ratings: +706

View Profile WWW
« Reply #8 on: 08 March, 2011, 02:46:41 »
0

Java is awesome in that it's really, really consistent in everything. In other words, programs are object definitions and object definitions are programs, so you pretty much need to grasp OOP to understand Java (but once you get into Java, you'll start understanding OOP pretty easily). On the other hand, this can cause headaches too Cheesy

In short, a class (object definition) is like a specification. A class defines a type of object, which could represent anything -- car, bank account, lobster, whatever. In essence, you're creating a new type of variable, with its own attributes and functions, which you can create instances of through other programs.
Logged




Michael_Lee
LV9 Veteran (Next: 1337)
*********
Offline Offline

Gender: Male
Last Login: 09 August, 2012, 18:48:39
Date Registered: 05 August, 2010, 01:00:06
Posts: 1020

Total Post Ratings: +115

View Profile
« Reply #9 on: 08 March, 2011, 03:21:12 »
0

I don't know much about Java (apart from the fact that it's highly object-oriented), but from my experience transitioning from TI-Basic and Axe to C++ and Python, I can say that OOP isn't as hard as people make it out to be (either that, or I never learned it properly Tongue) -- I found that using OOP in various projects turned out to be the best way to grok it.  Also, it's hard to get out of the habit of using global variables, but in OOP languages, globals are generally frowned on.

Really, I don't think you'll have a problem.
Logged

My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.
Deep Thought
So much to do, so much time, so little motivation
Administrator
LV13 Extreme Addict (Next: 9001)
*
Offline Offline

Gender: Male
Last Login: Today at 21:12:29
Date Registered: 19 May, 2009, 08:00:00
Location: The Universe
Posts: 7812


Total Post Ratings: +706

View Profile WWW
« Reply #10 on: 08 March, 2011, 03:37:29 »
0

I don't know much about Java (apart from the fact that it's highly object-oriented), but from my experience transitioning from TI-Basic and Axe to C++ and Python, I can say that OOP isn't as hard as people make it out to be (either that, or I never learned it properly Tongue) -- I found that using OOP in various projects turned out to be the best way to grok it.  Also, it's hard to get out of the habit of using global variables, but in OOP languages, globals are generally frowned on.

Really, I don't think you'll have a problem.

You won't. It just involves a different way of thinking about programs Smiley
Logged




Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 0.334 seconds with 31 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.