Java vs c++

which is better? what are the advantages for use one instead of the other? and what are the main differences?
ty for the answers
unrelated pic

Other urls found in this thread:

nomad.so/2015/03/why-gos-design-is-a-disservice-to-intelligent-programmers/
twitter.com/NSFWRedditGif

Dunno bro I use scratch

Java and C++ are very different languages with pretty distinct domains

Are you serious or just trolling OP?

i am new in programming and i am trying to find the best language suited for me.

Programming as a hobby or a profession?

go for c/c++, the rest of the languages are "it just werks" tools

I'd love to make it my new job

Java is the default language of the code monkey - unless you're doing webshit, in which case you'll probably want JavaScript instead.

Camaleonti

What languages does a non code monkey use ?

>i am new in programming
start with the basics by learning python
very easy to learn and intermediate to master

c/c++ comes later

These days they are pretty much the same and it boils down to preference.
What you should do is research what people in your industry uses.
Simply look up projects you want to make something similar to and then pick that language. (maybe look at a few projects just to be sure)

If you know one language and the rest of the project is written in another you are not being very helpful.
Luckily, programming languages are the easiest part of programming, so if you pick one, you can easily learn another.

As for technical differences:
C++ uses a compiler to create a binary that you can run on your computer.
If you have multiple different setups (different OS or CPU) you need to compile it multiple times.
You can also use a library that is specific to one OS or CPU so it won't work with anything else but usually, it works everywhere.
With java, you compile it to a binary that can run in a virtual machine.
This means you can just share this binary and then run it on any OS, any CPU as long as they have a java virtual machine.

There are a lot of other languages that need a virtual machine or an interpreter to work.
I lumb these together because the downside is basically the same.
They are a bit slower, but that doesn't really matter in most situations.
What matters is you need a specific application installed to run the application.
With a compiled language like C or C++, the setup is on the developer.

C, C++, Rust, Go, Vimscript or Emacs Lisp.

>C,C++
pajeet tier
>Rust
Gtfo tranny
>Go
"The language for Googlers"
>Vimscript or Emacs Lisp
Autism tier

Java and C# are pajeet tier. C and C++? Not so much.

Lol I am an embedded developer using C and C++. Trust me they are not pajeet tier, no way they can write reliable code in them.

>C, C++
>Pajeet tier

Found the pajeet

C++ is pretty quirky, you really do need to read up on it in a fair amount of detail or you will fuck yourself over.

Java has rails which allow brainlets input code and not crash everything but consumes a lot of memory and is appropriately slow when used by monkeys. C++ is much more powerful but will allow you to shoot yourself in the foot. Also java is more bloated and requires some excessive exception handling but provides you with some syntax sugar not available in C++, so it's a tie here.

>>C,C++
>pajeet tier
Nice reverse javalet.

There is exceptions in c++ although most people use assert.
If you follow the standards, c++ is easy to write and you won't have problems.

I simply pointed out the differences for clueless OP. If you go deeper, although you can easily include any code developed in C++ in your C++ project, it's won't really be consistent and you will see routines throwing exceptions, bare numbers or anything at all leading to segfaults. For large projects it's better to stick with some framework like boost or qt which will provide you with wide feature set. Although a lot of boost features were implemented in STL at this point and actual exceptions are used there.
Same probably goes for C too btw. I only developed modules for nginx and openssl and they provided me allocators and useful stuff in respective API. System programming is a different story though.

So many triggered pajeets, everyone knows the first thing you learn in schools is C & C++ stop pretending .

for beginner productivity, would recommend to learn java and skip sepples

this
you could learn c++ first anyway since it will makes you easier to learn java later (for me, 1-2 weeks oracle's new to java tutorial on 1-3 hours/day)
find something that interest you first rather than market to learn it (C++ for vidya or java for droid) since you wont enjoy learn any of it for shekels especially C++ (messy hell that makes you hate your brainletself)

good luck owo

>seriously considering javs

C++ is a gnarly, ancient language with lots of undefined behaviour and legacy cruft. Java's the same, but you need to know less of it in order to be productive and you don't need to manage your memory manually.

java is better because you can use it for webdev

>cannot do webdev in pure, untainted, C

C is basically assembly, youd be wasting your time.

java
byte a = 4;
byte b = 3;
byte c = a + b;

compilation error.

>go
>non-pajeet language
HAHAHAHAHAHAHAHAHHA

nomad.so/2015/03/why-gos-design-is-a-disservice-to-intelligent-programmers/

because it is not in a class?

C++ and Kotlin = Best combo.

Kotlin gives you the whole JVM eco, mobile, JS and Native (iOS and WASM planned)
C++ give all performance you would ever need


Java is pretty much legacy stuff and it will never ship on browser, so its a dead end.

you clearly don't know either

I'm not a pajeet and the language they teach the most in India is Java. Not every school is like your school.

They changed to more java now , just like the rest of the world.The pajeets who are working now were taught c&c++
>I'm not a pajeet
Yeah nice try pajeet

pls no bulli, i'm not pajeet but you are stupid american