Know C++, want to learn Java

Know C++, want to learn Java. Where do I learn from, how long will it take? Btw I'm completely new to object oriented languages

Other urls found in this thread:

lmgtfy.com/?q=Java tutorial
paulgraham.com/pypar.html
twitter.com/SFWRedditImages

C++ is oop you dolt and Java is easy as shit to learn. 2 years max

t. Pajeet Ruhmakumi

>want to learn Java
no
no you don't

>Hurr durr Java is shit

>Know C++, want to learn Java
You know literally everything there is to know except some terminology and some minor changes

>Btw I'm completely new to object oriented languages
Then you dont know C++

i just installed eclipse and have stackoverflow handy. java is easy to learn.

use xtend if you can btw.

if you most of c++ then the java language is piss-easy.

the only thing to learn is the shit idioms and programming style (abstractKillMeNowFactory) and learn which libraries are in fashion.

I personally recommend intellij idea community edition

frankly, its too similar for me to care, and eclipse has a shitload of extensions (xtend being one) and helps out there.

it's called a book you fucking nigger

nope

>Know C++

Two words and I can already tell you're lying.


>want to learn Java

Damn, this is getting even better.


>Where do I learn from

lmgtfy.com/?q=Java tutorial


>how long will it take

1 year, 3 months, 2 weeks, 4 days and 5 hours.


>Btw I'm completely new to object oriented languages

Btw C++ is an object oriented langauge.

There is some limitations to the file names and you have to learn a new build system, but the syntax is very close to c++, but without all the syntax sugar that keeps you from killing yourself.

>completely new to object oriented languages
>know C++
nice logic you dingus

>want to learn Java

Why the fuck do you want to learn that piece of shit.

>Btw C++ is an object oriented langauge.

No it's not.

Why is it when someone writes an introduction to a language, they never start with the important parts?

Why is syntax the first thing they jump to?
How to compile, how to spread the program across files, should is more important as that is actually what changes from language to language.

Syntax is fairly easy to pick up and expand upon when you are exposed to the language.

Why is this chapter skipped?

Java is fine... Not my favourite language but its not shit as /g makes it. Whats so wrong with it?

...

It doesn't have operator overloads.

dont use it if you need lots of operator overloads. I mean thats like complaining that fortran cant be used for scripting on web instead of javascript.

...

> 2 years max
Why so long, memorising every Java library every made?

Some problems:

1. Java is ugly.

Java can do almost anything, from numeric simulations to networking, even Minecraft. But it is Ugly. It's verbose and it carries a lot of shit syntax that can't get removed because of legacy code. If you look at Java 8, it's nothing like the earliest Java code, no more "Put System.in in an input stream reader and warp a bufferd reader arround that.." - nobody has time for this shit. Modern Java is almost a completely different language.


2. Java is too easy.

This may sound absurd, right? But since it's an "easy" langauge in terms of "you can't really shoot yourself in the foot" it attracts a lot of noobs. See "the python paradox" by Paul Graham:
>paulgraham.com/pypar.html


3. There are better langauges out there.

Seriously, today we have tons of wonderfull and powerfull langauges. Java has a lot of momentum because there's a metric godzillion of legacy code in industry. But force a Java programmer to use Scala for two month and I bet he won't go back. Not that Scala is so incredibly good, but Java is just clumsy.

I completely agree, tho i like java vm haha. As i said not my favourite language but i wouldnt put it into shit tier, its fine for bussiness crud apps... Tho all should use scala or clojure

Here is an example of what I meant:

/* List all files in current directory */

// old Java
File folder = new File("your/path");
File[] listOfFiles = folder.listFiles();

for (int i = 0; i < listOfFiles.length; i++) {
if (listOfFiles[i].isFile()) {
System.out.println("File " + listOfFiles[i].getName());
} else if (listOfFiles[i].isDirectory()) {
System.out.println("Directory " + listOfFiles[i].getName());
}
}


// modern Java
Files.list(new File(".").toPath()).forEach(System.out::println);


I mean it's cool, but if you told a Java develloper in the 90s that his langauges will someday include Lazy evaluated streams he would have laughed hysterically.

As it is, Java desperately tries to disguise it's shortcomings with heavy syntactical sugar.


But no matter how much makeup you put on, an old hag doesn't have the body of a girl in her twenties. Programmers today aren't as stupid anymore, sooner or later the industry will accept that Java is a dying technology. But it will probably take 10 more years or something..

FEATURES OF OOP:
Object.
Class.
Data Hiding and Encapsulation.
Dynamic Binding.
Message Passing.
Inheritance.
Polymorphism.

Maybe my lack of hate is due to the fact that i havent used it professionally

Indeed. C++ is free-form, or chimera. You can use classes, but you don't need to.

In Java, there's no choice.

>I know C++
>I'm new to OOP
You don't know shit

Just try to build a resonably big project in Java.
Use the design patterns, use the collection framework, maybe even write adapters, factories and so on.

Then try to build exactly the same application in a modern langauge. Notice how smooth the usage of clojures is in comparison of the crippled lambdas of Java. Notice how much errors you can avoid simply by using immutable values. Notice how concise and readable code can be. Notice that you need only half of the includes since you have a proper standard library.

Then look at the Java version again and cry yourself to sleep.

>terminology
this shit fucked me up really bad. same shit named differently