Java retards will defend this

> hurr OOP is so intuitive

java.lang.Object
java.lang.Number
java.lang.Integer

public final class Integer
extends Number
implements Comparable

docs.oracle.com/javase/7/docs/api/java/lang/Integer.html

Other urls found in this thread:

docs.oracle.com/javase/specs/jvms/se7/html/jvms-2.html#jvms-2.3.1
nikic.github.io/2011/12/27/Dont-be-STUPID-GRASP-SOLID.html
en.wikipedia.org/wiki/Smalltalk
twitter.com/SFWRedditImages

Math illiterate.

OOP is just a tool, but when it's forced across the whole language then you end up with utter crap like Java.

brainlet

Java isn't pure OOP. It's mostly procedural really.

> b-b--b-but OOP works it's just never been tried

explain to me how this isn't intuitive
are you mixed up somewhere about how integers are numbers?

learn some math retard

An int should not be an object.

Wrapping an int in a class is pretty much the definition of retardation.

C++ and OOP enthusiast reporting in!

About your dumb little example, the idea of primitive types was a mistake in the design of java. If they really wanted to go for the "pure oop lang" then even built in types should have been objects but now they're forced into creating dumb ass wrapper classes to make the language more usable. This is not the fault of oop but simply the best fix using it which, mind you, is still quite elegant.

> how does a CPU work

Maybe this would be acceptable in a scripting language like Python

But for java which is supposed to be a c++ alternative this is an outrage

Instead let's have operator overloading everywhere and have no idea what the code is actually doing.

it just werks

>supposed to be a c++ alternative
Not true. No competent dev. would suggest using java for anything but web software or library/software prototyping. things that c++ is not good for.

Your right that the idea of all objects might feel a little scripty, but it's an entirely doable abstraction even for a system programming language.

Instead let's have lists of methods on every line and have no idea what the code is actually doing.

Or not

Look at C#, a fully OOP language that actually works incredibly well.

works for me

Why is C# a fully OOP language and not java?

well define the architecture dipshit.
it would still be irrelevant since Java code is compiled to "native" architecture instructions anyhow so i have no clue what you're even getting at.

holyc > java

Technically Java is compiled to JVM bytecode, which is well-defined and doesn't depend on the underlying native architecture. But I agree that the guy you replied to is a moron.

I want to use Java for GUI programming in Android. Renderscript and connected through JNI (NDK) C, C++ for heavy computations in Android.

no shit.

and what do you think bytecode is compiled to?
Java is a JIT language.

also you forgot that as of Java 8, certain platforms will have an AOT compiler as well.

Are you unironically saying Java is pure OOP? If you are, then you are either an obvious troll, or a nescient idiot.

Java is full of static methods, deep inheritance, constants, annotations, etc.

Read a book once in your life.

daily reminder every value is stored on the heap in java

>missing the point this hard

The Java bytecode format defines several integer types, cf. docs.oracle.com/javase/specs/jvms/se7/html/jvms-2.html#jvms-2.3.1
Whether you're running it on Hotspot or Dalvik or your shitty homebrew JVM is irrelevant.

but malloc is too hard

what about the call stack?

the fuck point are you making?

that you're stupid?

this doesn't change the fact, barring JIT lag, java bytecode is compiled to platform specific instructions on any relevant JVM implementation.

java neggro. JIT SHIT AOT BUGGOT FAGGOT, you fucking brainwashed imbecile, you just accepted that you're worse than a fucking monkey.

lol, are you mad that Java has virtually equivalent performance to sepples?

Values stored on stack
C# also has value types and reference types, unlike Java where everything is a reference type

This entire fucking thread is about integers, you mong.

those are fine in OOP

literally any architecture

>everything is a reference type
le what???

The real tragedy is that Number doesn't specify any numerical methods. All numbers add and subtract, multiply and divide, no?

I guess it becomes an issue when the concrete types are different. That's why Haskell wins in this regard.

what

>witnessed

then use int instead of the boxed Object type?

>An int should not be an object.
int isn't an object, it's a primitive variable type.

Explain the OP then

it's a wrapper class to work with the tacked on generics functionality.

it's just bad design, but it works ok and as a plus, Integer comes with a bunch of helper static methods.

The actual logic would be different depending on what type of number it is. I'm not a Java programmer, but in C++ they would declare such methods as "pure virtual" meaning that it has to be implemented by the class inheriting from it.

reference or value types does not define if something is oop or not you are just retarded

No they're not. Don't be retarded.

They go completely against SOLID and GRASP.

nikic.github.io/2011/12/27/Dont-be-STUPID-GRASP-SOLID.html

You should shut up and not talk about what you don't understand anymore!

you do not have a SOLID GRASP on what the fuck you're talking about

You just proved yourself wrong, retard. I said Java was not pure OOP, and your pic states exactly that.

Am I being trolled? I'm being trolled, right? Hah, you really had me there!

>isn't pure OOP
Java is completely based around object orientation. I agree that there are different and also better ways of creating an object oriented language but Java is still inherently object oriented.

Every java program has to have at least 1 class containing a static main method.
There are no actual functions. literally every "function" is a method on an object or a static method on a class.
Actually every little piece of java code has to be inside a class.

Daily reminder that all languages are built on C and are therefore not truly object oriented.

Class-driven isn't object oriented, retard.

Just because you're forced to put stuff in classes ain't mean shit.

You can still make 100% procedural code in Java.

Not to mention, classes are not part of the OOP definition. The best OOP languages don't even have classes.

What's the problem with it having to be in a class? In python, you'll have to put it in some file. You'll have to import it and then call the function it all the same.

>all languages are built on C

There's nothing wrong with this.

Not all languages are built on C.

And some languages are truly object oriented. For instance, Smalltalk.

en.wikipedia.org/wiki/Smalltalk

brilliant logic

As I said, there are better ways to design an object oriented language than the Java approach.
There isn't one true way to do object orientation. Java does it with classes. I agree that this is a bad approach because it makes you focus on classes instead of the actual objects. But I'd still call it an object oriented language.

Yes, you can write procedural code in Java, but it clearly favors object oriented programming.

Nothing is really wrong with it. It just shows that classes are an essential part of Java.
Java uses a class-based object orientation approach which is integrated so deeply into the language that everything you write has to be a class.

Yes, that's true. But what's the problem with it? More boilerplate code?

I literally just turned down a job offer because the company was using Java instead of rails or even Javascript as a backend.
>mfw I found out

>ruby on rails
Wow. What the fuck. The most low tier of languages.

Javascript however, is absolutely horrid to work with. It's a cancer. But it's a cancer that for some reason, hipsters and young people have latched onto, and created an abhorrent ecosystem to work with.

The reason the web isn't flooded with awesome single page apps, is because of the load of bullshit you have to cope with in the javascript world.

>I literally just turned down a job offer because the company was using a real language instead of things that shouldn't ever be used as backend as a backend.

>everything is a reference type

Rookie mistake. Everything in Java is a value type. With objects, the passed value is a pointer const.

>pointer values are not a form of reference
Am I being memed or are you that much of a moron?

That's an Integer.
It's not the same as an int.

If you have trouble grasping the basics of inheritance, then maybe you're the problem.

Yes it is you ninny

People who don't know Java should fuck right off. An Integer is an immutable wrapper class around the primitive int type. In cases where the usage can be interchangeable, auto-boxing and auto-unboxing is done by the JVM.

India is the greatest country in the world

wrapping an integer type in a class is like wrapping your penis in barbed wire