Author Topic: New to Java Programming  (Read 1974 times)

0 Members and 1 Guest are viewing this topic.

Offline Sergie The Sergon

  • Vibrating Furby
  • *
  • awards This user has been a forum member for over 10 years
  • Posts: 14
    • Awards
New to Java Programming
« on: September 16, 2015, 02:45:20 AM »
Hi,

So, I'm doing a unit at the local University called Programming Fundamentals, which is basically a unit for those wanting to do other Programming units that have little to no experience with Programming.

In this unit, we are learning how to make programs using Java.  I'm still new to Programming in general, but it is an interesting class.  Does anyone have any experience with Java that could give me some tips?

Offline Aldebar

  • Avid Aardvark
  • *
  • awards This user has been a forum member for over 8 years
  • Posts: 36
  • Gender: Female
  • Shag Carpet
    • Skype
    • Steam
    • DeviantArt
    • Tumblr
    • Awards
  • Species: Bovine (Yak/Bison)
  • Coloring: Blacks, dark browns, white outline around ice blue eyes.
  • Height: 7'6"
  • Build: Stocky, a bit thick
  • Currently: Staying strong.
Re: New to Java Programming
« Reply #1 on: September 16, 2015, 10:53:46 PM »
I'm currently in a second-level programming fundamentals class where we use Java, and I've taken both a basic programming fundamentals class and a basic Java class. I had pretty much no prior programming experience and struggled with it at first, and still do a little when it comes to new concepts, so I know how challenging it can be. Especially if you're like me and have never been very good with math.

What helps me the most is to just practicing coding; once I know I can get something working and written correctly it comes much more natural to me the second time. It might also help to look up tutorials online (on Youtube and the like) and find programming-based communities such as Stack Overflow where you can ask questions and get help. Also check to see if your school offers peer tutoring for programming courses.

Offline MrRazot

  • Resident Nice-guy
  • Unique Unicorn
  • **********
  • awards This user has been a forum member for over 10 years This user has reported a valid and verified forum bug This user has donated to the forum more than once. This user has donated to the forum.
  • Posts: 2702
  • Gender: Male
  • Marching onward on my Quest
    • Skype
    • Steam
    • Fur Affinity
    • Awards
  • Species: Lanner Falcon
  • Coloring: Selection of Browns
  • Height: Aprx 180cm
  • Weight: Aprx 50kg
  • Build: Slim
  • Currently: Well, it was a good run.
Re: New to Java Programming
« Reply #2 on: September 19, 2015, 09:06:32 AM »
Java is fun, just don't forget the basics and the more complicated stuff will be a breeze.

Also depending on which program you're using, there may be a load of documentation that comes with it in regards to different coding terms. It may even have some form of auto-fill or auto-correct which can make things easier.

Once you start making your own classes, the sky is the limit.
  • Avatar by: John Redbeard
  • Signature art by: MrRazot

Offline anoni

  • Zoomorphic Zebra
  • **********
  • awards This user has been a forum member for over 10 years Assigned to someone who is observed to be very friendly toward other members (frequently welcoming people in the Intro board, answering questions, etc.) This user has reported a valid and verified forum bug This user has made a suggestion for the forum that was approved and implemented
  • Posts: 6179
  • Gender: Male
  • This statement is a lie
    • Steam
    • Kingdom of Lacertus (clan website) we're not furry oriented, but we accept furries (especially artists) :P
    • Awards
  • Species: Fox
  • Coloring: Beige
  • Height: 183 cm
  • Weight: 65 KG
  • Build: Slim
  • Currently: Cruising through the 4th dimension
Re: New to Java Programming
« Reply #3 on: September 29, 2015, 09:13:56 AM »
Thing you have to know is object oriented design. Java has the capacity to have programs that are very nice and modular, so using that fact is the best bet for a good java programmer.

Here are some things to know:

  1. Java is made of objects, each object is part of a class. A class will contain a definition of an object, so it will contain what variables it has, what methods it can use, the object is the actual instantiation of a class. So you NEVER ACTUALLY USE A CLASS DIRECTLY, you use objects. Think of a class as like a definition, and an object as the actual word.

  2. All variables in Java are references, not values. Lets say you have a class called Point, which has a variable x and y. When you have say "Point p = new Point()" p is not a value of x and y, it's a reference to an Point object. IE: p is an ADDRESS IN MEMORY, it is not an object it simply is the address of where the object is! This is important to note cause some weird problems can occur if you don't take this into account, for example

If I have a list of points and I want to fill them with many points, I can't do this

Code: [Select]
  Point p;
  List<Point> points = new List<Point>();
  for (int i = 0; i < 10; i++) {
    p = new Point();
    points.Add(p);
  }

  Because p is simply an ADDRESS to a point, when you add "p" to the list points, you're just adding the REFERENCE, but not the actual point object! So upon execution of this code, you'll have a list full of the SAME POINT OBJECT (the last one you instantiated), not a list of unique point objects. To get a list of unique point objects you'd need to do this

Code: [Select]
  List<Point> points = new List<Point>();
  for (int i = 0; i < 10; i++) {
    Point p = new Point();
    points.Add(p);
  }

  This way you're assuring that each instantiation in the list points is a new point object. I know, it's a very small change, but I've ran into this bug before and it takes forever to figure out!

  If you don't understand any of what I said now, don't worry, but in the future when you become more used to Java you'll realize this advice is important.
« Last Edit: September 29, 2015, 09:18:20 AM by anoni »
  • Avatar by: WingedZephyr
  • Signature art by: MrRazot
(int(e-x^2, x = -infinity..infinity))2 = Pi


We fight, we recruit, we are the anthropomorphic army. FDF forever!

$_ = "gntusbovueqrmwkradehijqr"; tr/a-z/lad hijacked under stop sign!/; print $_, "\n";

 

Powered by EzPortal

anything