Learn Java Programming: UML Necessary?

In summary, if you want to learn Java programming, you should start with the practical part and skip over the UML theory part.
  • #1
AllenHe
74
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
  • #2
IMO, the UML (Unified Markup Language?) part is not germane to learning about Java.
 
  • #3
So what shall I read about? Do you mean that I can go directly to the practical part?
 
  • #4
And, I was been told by my teacher that I should study C++ first, is it true?
 
  • #5
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.
 
  • #6
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.
 
  • #7
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.
 
  • #8
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.
 
  • #9
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
 

Related to Learn Java Programming: UML Necessary?

1. What is UML and why is it necessary for learning Java programming?

UML (Unified Modeling Language) is a standardized graphical language used for visualizing, specifying, constructing, and documenting software systems. It is necessary for learning Java programming because it provides a visual representation of the code, making it easier to understand and communicate the design and structure of the program.

2. How is UML used in Java programming?

UML is used in Java programming to create diagrams that represent different aspects of the software, such as class diagrams, object diagrams, and sequence diagrams. These diagrams help developers to plan and organize the code, making it easier to write and maintain complex programs.

3. Are there different types of UML diagrams used in Java programming?

Yes, there are several types of UML diagrams used in Java programming, including class diagrams, object diagrams, sequence diagrams, use case diagrams, and activity diagrams. Each type of diagram serves a specific purpose and helps to visualize different aspects of the software.

4. Is it necessary to learn UML before learning Java programming?

No, it is not necessary to learn UML before learning Java programming. However, having a basic understanding of UML can make learning Java easier and more efficient. It is recommended to learn UML alongside Java programming to better understand the code and design of software systems.

5. Where can I learn more about UML and its application in Java programming?

There are many online resources and books available to learn more about UML and its application in Java programming. Some popular resources include the official UML website, tutorials on Java and UML, and books such as "UML Distilled" by Martin Fowler and "Java: A Beginner's Guide" by Herbert Schildt.

Similar threads

  • Programming and Computer Science
Replies
8
Views
1K
  • Programming and Computer Science
Replies
6
Views
1K
  • Programming and Computer Science
Replies
5
Views
964
  • Programming and Computer Science
Replies
8
Views
3K
  • Programming and Computer Science
Replies
11
Views
1K
  • Programming and Computer Science
Replies
7
Views
701
  • Programming and Computer Science
Replies
15
Views
1K
  • Programming and Computer Science
Replies
3
Views
3K
  • Programming and Computer Science
Replies
22
Views
1K
  • Programming and Computer Science
Replies
1
Views
1K
Back
Top