Java Learn Java Programming: UML Necessary?

  • Thread starter Thread starter AllenHe
  • Start date Start date
  • Tags Tags
    Java Programming
AI Thread Summary
Learning Java programming can be approached without delving deeply into UML (Unified Modeling Language), as it is not essential for understanding Java. Many participants in the discussion suggest that beginners can focus on practical programming rather than theoretical concepts like UML, especially if it feels complicated. There is a debate about whether to start with C or C++ before Java, with some arguing that starting with a procedural language like C can provide a solid foundation for understanding programming concepts before tackling object-oriented programming (OOP) in Java. Others advocate for learning OOP concepts early to avoid complacency with procedural programming. The consensus is that while C++ is more complex than Java, it may offer valuable insights into programming fundamentals. Ultimately, the choice of starting language depends on personal preference and learning style, with some recommending Python as an alternative for beginners.
AllenHe
Messages
74
Reaction score
0
I want to start learning Java programming,by myself. I got some PDF books. In the introduction, it talks about UML, but I find it complicated. I want to know whether it is a must to read the theory part, or I can just start on the practical part.
 
Technology news on Phys.org
IMO, the UML (Unified Markup Language?) part is not germane to learning about Java.
 
So what shall I read about? Do you mean that I can go directly to the practical part?
 
And, I was been told by my teacher that I should study C++ first, is it true?
 
Better begin with C. I too began learning Java but lost all my enthusiasm while going through 'OOPS'. It made me say oops, then my teacher told me to begin learning C and now I can feel the difference. Best of luck.
 
AllenHe said:
So what shall I read about? Do you mean that I can go directly to the practical part?

If the Java stuff doesn't use the UML stuff enough that it gets in the way, you should be able to skip ahead to the Java stuff. If the UML stuff does get in the way, find another book.

AllenHe said:
And, I was been told by my teacher that I should study C++ first

Did he say why? I don't think it's necessary, but I've never studied Java myself, just C++ (and a few other languages), so I can't compare how the two are for learning, from personal experience. Lots of schools and universities teach Java as their first programming language.
 
AllenHe said:
I want to start learning Java programming,by myself. I got some PDF books. In the introduction, it talks about UML, but I find it complicated. I want to know whether it is a must to read the theory part, or I can just start on the practical part.

My own point of view on this, and it is NOT one that is universally shared, is that you are MUCH better off leaning a sequential programming language such as C before you try to learn OOP languages such as C++ and JAVA. As physics kiddy pointed out, the OO stuff can make your head hurt and make you want to NOT learn programming, whereas sequential programming, which can be difficult enough all by itself, is FUN.

Once you learn sequential programming, THEN the advantages of OOP become obvious and you are much more willing to put up with the occasional headache it will give you.
 
phinds said:
My own point of view on this, and it is NOT one that is universally shared, is that you are MUCH better off leaning a sequential programming language such as C

Or the "sequential" (procedural) parts of C++. :wink: You can do a lot with C++ before learning how to create your own classes (objects), just using classes that others have written such as the ones in the standard library. IMO the C++ 'string' type is much easier to use than C-style char arrays and pointers for text data, and simple I/O is easier with the C++ 'cin' and 'cout' objects than with C-style input and output functions.
 
You can write procedural programs in Java if you really want to. Just declare everything "public static" and away you go.

IMO the C++ 'string' type is much easier to use than C-style char arrays and pointers for text data
... which is part of the reason why Java doesn't have pointers at all. (Pause for C programmers to recover from falling off their chairs in shock...)

Java can do all the "good" things you can use C pointers for, but there is no way to mess around with the contents of memory directly. This tends to made debugging Java programs rather boring, compared with some other languages :devil:

Personally I'm in favor of starting to learn OOP as soon as possible (i.e. within hours of starting to learn to program rather than months or years). Otherwise, there is the danger of knowing enough to "get by" with procedural programming and losing the incentive to learn OOP "properly".
 
  • #10
AlephZero said:
Personally I'm in favor of starting to learn OOP as soon as possible (i.e. within hours of starting to learn to program rather than months or years). Otherwise, there is the danger of knowing enough to "get by" with procedural programming and losing the incentive to learn OOP "properly".

I'm with JTBell in thinking that a programmer should start with a procedural language before learning OOP. At some point, even OOP programmers need to understand how to write code that executes sequentially, and how conditional branches and loop structures work.
 
  • #11
AlephZero said:
... which is part of the reason why Java doesn't have pointers at all. (Pause for C programmers to recover from falling off their chairs in shock...)

The last couple of years that I taught our two-semester intro programming sequence in C++, before we switched it to Java and someone else took it over, I was using strings and the standard library containers (vectors etc.) so much that I wasn't using pointers at all until right at the end of the course. I had to invent some really hokey examples to try to motivate using pointers. The other CS guys in the department told me not to worry too much about it, because students would be forced to come to grips with pointers when they got to assembly language in a later course anyway.

Personally I'm in favor of starting to learn OOP as soon as possible (i.e. within hours of starting to learn to program rather than months or years). Otherwise, there is the danger of knowing enough to "get by" with procedural programming and losing the incentive to learn OOP "properly".

My feeling is that designing and writing classes should be delayed long enough so that students become comfortable with using classes that others have written, and having to go by the documentation for the classes without knowing in detail what's going on inside them. I think it makes the concept of "information hiding" clearer and more concrete when they start writing their own classes, and gives them a better idea of what their "responsibilities" are.

Likewise for ordinary functions, for that matter. I always gave them practice in using standard functions (usually from the math library) before teaching them how to write their own.
 
  • #12
AllenHe said:
I want to start learning Java programming,by myself. I got some PDF books. In the introduction, it talks about UML, but I find it complicated. I want to know whether it is a must to read the theory part, or I can just start on the practical part.
No, UML has nothing to do with Java. I've been writing Java programs for more than 10 years and I still don't know the first thing about UML :wink:

Well, maybe the first thing... UML stands for Unified Modeling Language, and it's basically a standard way of diagramming how the parts of a complex computer program interact with each other. I would advise you not to learn it before you've gotten very comfortable with plain old programming.
AllenHe said:
And, I was been told by my teacher that I should study C++ first, is it true?
Seems like an odd sequence, since C++ is considerably more complicated than Java. Then again, programming is a complex discipline so perhaps there's something to be said for choosing a language that doesn't let you take too many shortcuts as you're learning it.

I'm actually a fan of Python as a first programming language, for what it's worth.
 
  • #13
Oh,, then I think I should start learning C++ first.Thanks
 
Back
Top