Car car = new Car();

Car car = new Car();

A Conspiracy Theorist Is Talking Shirt $21.68

Ape Out Shirt $21.68

A Conspiracy Theorist Is Talking Shirt $21.68

  1. 4 weeks ago
    Anonymous

    class OP extends homosexual{}

    • 4 weeks ago
      Anonymous

      It's really annoying how "extends" in programming means exactly the opposite of what it means.
      A class is a concept. To extend a concept is to allow more instances to fall under it. Extending a class restricts the instances falling under it.

      • 4 weeks ago
        Anonymous

        that's why in C++ it's just ":" and in spoken word it's called inheritance, a more concrete class has ancestor as more abstract class that matches it, Java is just moronic

      • 4 weeks ago
        Anonymous

        To extend a concept means to keep the original and add stuff to it homie

        • 4 weeks ago
          Anonymous

          Exactly, and the stuff is the instances of the class. In mathematics, by the axiom of extensionality, a class is defined by its instances.

          • 4 weeks ago
            Anonymous

            >the stuff is the instances of the class
            Extension does not mean disjointed union, that would be an interface

          • 4 weeks ago
            Anonymous

            Nobody mentioned a disjointed union. Learn to read.

          • 4 weeks ago
            Anonymous

            A subclass is defined both by the class it inherits from and the stuff it adds to it, not just the latter

          • 4 weeks ago
            Anonymous

            In mathematics and philosophy and life, a class A extends a class B if it has all the elements of A.
            In java, a class A "extends" a class B if B has all the elements of A.

          • 4 weeks ago
            Anonymous

            >In java, a class A "extends" a class B if B has all the elements of A.
            Wtf are you smoking

          • 4 weeks ago
            Anonymous

            A extends B in java <=> x in A implies x in B, means B has all the same elements and more, means B actually extends A.

          • 4 weeks ago
            Anonymous

            You are getting it backwards homie, I don't even know where the frick you got this from

          • 4 weeks ago
            Anonymous

            Just read what I wrote again. Everything I said is logical and 100% makes sense.
            You are just confused or dumb.

          • 4 weeks ago
            Anonymous

            You are literally getting it backwards you fricking braindead pseud

            A extends B in java <=> x in B implies x in A

          • 4 weeks ago
            Anonymous

            Oh my god you are moronic. It's literally the opposite. Have you never coded in java?

          • 4 weeks ago
            Anonymous

            class B {
            public int x = 10;
            }

            class A extends B {
            public int y = 20;
            }

            public static void main(){
            A a = new A();
            System.out.println(a.x);
            }

            By your moronic logic a.x shouldn't exist

          • 4 weeks ago
            Anonymous

            a.x exists be cause B extends A, you idiot. That's what it means to be a bigger class: all members of A are also members of B, and all members of B have property x, so all members of A also have property x, because B is a BIGGER class that EXTENDS A.

            public B b = new B();
            System.out.println(b.y);
            According to you, this should work. Fricking moron.

          • 4 weeks ago
            Anonymous

            >According to you, this should work
            No lmao

            So let me get this straight: if according to you B is the bigger class then what additional elements does it have? Surely not y

          • 4 weeks ago
            Anonymous

            B b = new B();

            B has the element b but A doesn't have the element b, because A is a smaller class than B. This is elementary. I don't understand how you can be so moronic.

          • 4 weeks ago
            Anonymous

            >mixing up types, classes and sets of elements to mud the waters

          • 4 weeks ago
            Anonymous

            It doesn't matter which term you use in this context. The point still stands.

          • 4 weeks ago
            Anonymous

            Ok Black person this is my last reply

            The TYPE modeled by CLASS B contains all the elements of the TYPE modeled by CLASS A and then some, meaning that the TYPE modeled by CLASS B is a bigger set than the TYPE modeled by class A.

            An INSTANCE of the CLASS A contains all the elements of an INSTANCE of the CLASS B and then some, meaning that an INSTANCE of the CLASS A is a bigger set than the INSTANCE of the CLASS B

            Terms matter and you are a pseud Black person

          • 4 weeks ago
            Anonymous

            >The TYPE modeled by CLASS B contains all the elements of the TYPE modeled by CLASS A and then some, meaning that the TYPE modeled by CLASS B is a bigger set than the TYPE modeled by class A
            This is literally what I said. Also you could remove the "type modeled by", it would mean the exact same thing.
            > An INSTANCE of the CLASS A contains all the elements
            An instance is an element. Wtf did you think an element of a class/type was?

          • 4 weeks ago
            Anonymous

            An object contains fields, which in turn can be other objects. Thus an object is itself a set of sets.

          • 4 weeks ago
            Anonymous

            Doesn't address my point.

          • 4 weeks ago
            Anonymous

            A extends B in java <=> x in A implies x in B, means B has all the same elements and more, means B actually extends A.

            In mathematics and philosophy and life, a class A extends a class B if it has all the elements of A.
            In java, a class A "extends" a class B if B has all the elements of A.

            Is this an elaborate shitpost? If so, congrats on the (you)s.

          • 4 weeks ago
            Anonymous

            >

          • 4 weeks ago
            Anonymous

            You are literally getting it backwards you fricking braindead pseud

            A extends B in java <=> x in B implies x in A

            >doesn't understand polymorphism
            many such street shitters, sad!

            >he doesn't understand covariance and contravariance
            Sorry buddy, that's not how class inheritance works.

      • 4 weeks ago
        Anonymous

        >he doesn't understand covariance and contravariance
        Sorry buddy, that's not how class inheritance works.

      • 4 weeks ago
        Anonymous

        >doesn't understand polymorphism
        many such street shitters, sad!

        • 4 weeks ago
          Anonymous

          >he doesn't understand covariance and contravariance
          Sorry buddy, that's not how class inheritance works.

          Not an argument.

  2. 4 weeks ago
    Anonymous

    i dont get it

    • 4 weeks ago
      Anonymous

      then get off DA

      • 4 weeks ago
        Anonymous

        i thought this was the tech consumerism board, not the programming board

    • 4 weeks ago
      Anonymous

      i dont want to

  3. 4 weeks ago
    Anonymous

    public class Vehicle : Idrivable, ICrashable, ICanHaveSexInAble, INewtonianSolid
    protected class Car : Vehicle, ISteerable, IBluetoothConnectable, ICar
    Car car = VehicleFactory.NewInstanceOfType<ICar, ISteerable>(make = "Fodr", model = "Corolla");

    FTFY. Next time don't be so lazy with your domain modeling. A proper object oriented hierarchy is crucial for success in the modern enterprise environment.

    • 4 weeks ago
      Anonymous

      I can still understand it so it's not OOP and enterprise enough

    • 4 weeks ago
      Anonymous

      should not Vehicle be abstract?

    • 4 weeks ago
      Anonymous

      >ICanHaveSexInAble
      This should be YouCanHaveSexInAble

      • 4 weeks ago
        Anonymous

        Inheritance is identity moran

    • 4 weeks ago
      Anonymous

      all of this and it doesn't even prevent you from creating a Ford Corolla lol

  4. 4 weeks ago
    Anonymous

    var c = new Car();

    Use that thinking you're smart then regret it on large codebase.

    • 4 weeks ago
      Anonymous

      car = Car()
      what's the problem?

      • 4 weeks ago
        Anonymous

        how does the compiler know if you are referring to a new or old car tho

  5. 4 weeks ago
    Anonymous

    `Vehicle car = Car.new(new CarTire[]{new CarTire() .... })`

    - Well used Interfaces
    - Factory methods
    - A thing shouldn't have to create its dependencies, it should be given them (dependency injection)

    • 4 weeks ago
      Anonymous

      Vehicle car = Car.new(new CarTire[]{new CarTire() .... })

      code tag tongue my anus

  6. 4 weeks ago
    Anonymous

    rate my car saars
    interface Car {
    void drive();
    }

    class BasicCar implements Car {
    @Override
    public void drive() {
    System.out.println("driving");
    }
    }

    interface CarFactory {
    Car createCar();
    }

    class BasicCarFactory implements CarFactory {
    @Override
    public Car createCar() {
    return new BasicCar();
    }
    }

    public class Main {
    public static void main(String[] args) {
    CarFactory carFactory = new BasicCarFactory();
    Car car = carFactory.createCar();
    car.drive();
    }
    }

    • 4 weeks ago
      Anonymous

      don't stutter, if you already have CarFactory, you can simply name the method "create()"

    • 4 weeks ago
      Anonymous

      Why is enterprise quality code so repulsive? I know it's supposed to make everything an object to increase code reuse but it's just so disgusting for some reason

  7. 4 weeks ago
    Anonymous

    let car = Car::new();

  8. 4 weeks ago
    Anonymous

    All the fricking POO examples are like that, Animal Class, Monster Class, Vehicle Class, fricking moronic examples. I never understood POO because of this and having a 34IQ

    • 4 weeks ago
      Anonymous

      OOP came up when the israelites realized that the advent of the Internet meant Infinite money, because they could have the glorious shabbos goy white engineer from the North send the UML to the shitskins to code for pennies on the dollar.

      It obeys to no real directive other than to prove your compliance. A programmer's mind has never worked that way. A programmer's mind will produce C/Cpp style code. Java style code is, instead, solely intended to prove that you're a well-read, textbook abiding golem of the israelites, that you're down with the clown, that you obey your programming.

      • 4 weeks ago
        Anonymous

        Stop larping you fricking Black person

    • 4 weeks ago
      Anonymous

      OOP the way it is normally used, is completely gay and moronic, polymorphism should only be used sparingly in really high level constructs

  9. 4 weeks ago
    Anonymous

    car.car.cardoor.siding.knob.window.up=false;

  10. 4 weeks ago
    Anonymous

    Frog frog = new Frog();

  11. 4 weeks ago
    Anonymous

    New old = new Old();

  12. 4 weeks ago
    Anonymous

    Tesla tesla = new VehicleFactory().getCarFactory().buildTestla().implementation().build();

    good morning sirs

    • 4 weeks ago
      Anonymous

      VehicleFactory factory = VehicleFactories.carFactory();
      Tesla tesla = factory.createDefault(Tesla.class);
      tesla.start().join();

  13. 4 weeks ago
    Anonymous

    data Car = Car
    car = Car

  14. 4 weeks ago
    Anonymous

    Car car{};

    • 4 weeks ago
      Anonymous

      gcc/libstdc++

  15. 4 weeks ago
    Anonymous

    var car = new Car();
    Car car = new();

    Or, my personal favorite:

    var car = new();

  16. 4 weeks ago
    Anonymous

    can I just not use classes ever? like I understand the utter basics of programming with C++ and a few other languages but just fail to ever see the utility of classes.

    genuine question, even if it sounds like moronic bait.

    • 4 weeks ago
      Anonymous

      yes you can, cniles reinvent whole OOP from scratch and even when they do it, they still have no classes, and it works

    • 4 weeks ago
      Anonymous

      Of course. I have been mostly doing that. You can use structs/dicts/objects.
      There is a few situations where they are neat, usually when making a game, but they are completely optional.

    • 4 weeks ago
      Anonymous

      yes. I never use classes

    • 4 weeks ago
      Anonymous

      Have you never written a large program before?
      Do you put everything in one file or something?
      JavaScript dev?

  17. 4 weeks ago
    Anonymous

    Why does Java suck the joy out of programming?

  18. 4 weeks ago
    Anonymous

    >auto car = new Car();

    • 4 weeks ago
      Anonymous

      NOOOO SAR THAT WILL LEAK MEMORY, SAR DO NOT REDEEM AND REMEMBER TO delete, OKAY?!

    • 4 weeks ago
      Anonymous

      >auto mobile = new Car();

      • 4 weeks ago
        Anonymous
      • 4 weeks ago
        Anonymous

        https://i.imgur.com/yMd8Q2D.jpeg

        >auto car = new Car();

        >car* car = new car{};

        • 4 weeks ago
          Anonymous

          >car car = car Car();

          • 4 weeks ago
            Anonymous

            >#define cAr =
            >#define caR new
            >#define CAr {
            >#define cAR }
            >#define Car ;
            >#define CAR *
            >car CAR car cAr caR car CAr cAR Car

      • 4 weeks ago
        Anonymous

        heheh

    • 4 weeks ago
      Anonymous

      Should be
      auto car = std::make_unique<Car>();

      • 4 weeks ago
        Anonymous

        c++ is a disease

        • 4 weeks ago
          Anonymous

          i'd say that too if i got filtered by it

      • 4 weeks ago
        Anonymous

        Good day sir

        • 4 weeks ago
          Anonymous

          sirs would use ::New() thoughever

    • 4 weeks ago
      Anonymous

      manual car = new Car();

  19. 4 weeks ago
    Anonymous

    Car car = new();

    • 4 weeks ago
      Anonymous

      C# gods won

  20. 4 weeks ago
    Anonymous

    struct Car {
    make: String,
    model: String,
    year: u32,
    }

    impl Car {
    fn new(make: String, model: String, year: u32) -> Car {
    Car { make, model, year }
    }

    fn drive(&self) {
    println!("{} {} is driving.", self.make, self.model);
    }
    }

    • 4 weeks ago
      Anonymous

      post hair colour

      • 4 weeks ago
        Anonymous

        It's black. I'm black.

  21. 4 weeks ago
    Anonymous

    >classes
    >objects
    >methods
    >properties
    >or are they attributes
    >this is not CSS
    >extends this dick
    >implements this dick
    ><this dick>

    • 4 weeks ago
      Anonymous

      >"Amidst the allure of simplicity, don't mistake complexity for incompetence. While it's easy to dismiss intricate systems as flawed, true brilliance lies in discerning when complexity serves a purpose. beware of praising simplicity blindly, for in the realm of intellect, it's the mastery of intricacies that truly distinguishes the brilliant from the mundane."

      • 4 weeks ago
        Anonymous

        >my spaghetti code is an elegant silk weave where every knot serves a purpose, yours is an abstract obfuscation made only to complicate the simplest of problems

        I just need a simple structure to hold pertinent information for vehicles, an over-engineered encapsulation method for an abstract data type just makes you sound like an ass.

  22. 4 weeks ago
    Anonymous

    In languages where type also serves as the variable declaration keyword you can't have type inference, hence this garbolini

    Compare with TypeScript:
    const car = new Car;

    C# cucks how do u tolerate this

    • 4 weeks ago
      Anonymous

      C# has Car car = new();

    • 4 weeks ago
      Anonymous

      >TypeScript
      >it's just JavaScript but with extra layers of bloat and pretension
      I'm just not going to listen to someone's opinion on languages when they promote that moronic gay shit.

      • 4 weeks ago
        Anonymous

        Yep. It doesn't do anything, it's just extra bloat you have to type so the compiler can protect you from rookie mistakes

        • 4 weeks ago
          Anonymous

          yep, ts is just a linter, the types are fake
          have to use it at work though because there's lots of morons

    • 4 weeks ago
      Anonymous

      or you just use a dummy keyword in place of the type, stupid

    • 4 weeks ago
      Anonymous

      You can also just use the variable declaration keyword if you want in C#.
      var car = new car();
      The reason you would want to use the type is to define the type of the reference to your object.
      class Op : homosexual{}
      homosexual op = new Op();

  23. 4 weeks ago
    Anonymous

    import car
    car.run()

  24. 4 weeks ago
    Anonymous

    >oop in a statically typed language
    ngmi

  25. 4 weeks ago
    Anonymous

    in c# it's now just Car car = new();
    You don't need to say what it is again after the =

  26. 4 weeks ago
    Anonymous

    QUICK!
    car(Car car) {
    car = Car();
    }

  27. 4 weeks ago
    Anonymous

    aCar := Car new

    • 4 weeks ago
      Anonymous

      >using dick assignment

  28. 4 weeks ago
    Anonymous

    car = Car.new()

    • 4 weeks ago
      Anonymous

      let car = Car::new()

      • 4 weeks ago
        Anonymous

        local car = Car:new()

  29. 4 weeks ago
    Anonymous
  30. 4 weeks ago
    Anonymous

    car1, car2 = [Car(x) for x in ['Chevrolet', 'GMC']]

    • 4 weeks ago
      Anonymous

      this is based and most comfy
      pythonchads win again!

      • 4 weeks ago
        Anonymous

        undoubtedly!!

      • 4 weeks ago
        Anonymous

        Pyjeet

  31. 4 weeks ago
    Anonymous

    or, the mature and fair complexion way

    std::unique_ptr<Car> car = std::make_unique<Car>();

    • 4 weeks ago
      Anonymous

      Just do
      >Car car;

      • 4 weeks ago
        Anonymous

        i said
        >fair complexion

    • 4 weeks ago
      Anonymous

      struct Car *car = malloc(sizeof(struct Car));

      • 4 weeks ago
        Anonymous

        This. all this nocoder seething about classes kek. if you really think you write decent code without classes, post it so we can laugh. its all cnile shit where you have to do this, which is 10x worse than op's example, which isnt even a real example because most langs have a variable declaration that has type inference

        • 4 weeks ago
          Anonymous

          int buf[128];
          vs
          int [] buf = new int[128];

  32. 4 weeks ago
    Anonymous

    declare -a carMake
    declare -a careModel
    declare -a carYear

    createCar ()
    {
    carMake+=($1)
    carModel+=($2)
    carYear+=($3)
    }

    car=$(createCar "Renault" "Twingo" "1997")

  33. 4 weeks ago
    Anonymous

    This drove me up a wall, but it ultimately makes sense when you understand how C# works.

    You're basically creating a variable car, of the object type of Car. Meaning, you have the blueprints called Car, and you have a box that will ultimately hold the car. You now put in an order to the factory with the = that you want a new Object that is the Car object itself.

    You can always rewrite this for clarity like:
    Car itsABrandNewCar = new Car()

    • 4 weeks ago
      Anonymous

      This this type of wordage I want confetti and fanfare to play while I guess the MSRP.

  34. 4 weeks ago
    Anonymous

    maloc(100)

    • 4 weeks ago
      Anonymous

      Funniest post

  35. 4 weeks ago
    Anonymous

    Stand bloody back sirts. authentic cnile code no pooooooop here from mario 64

    /**
    * Puts Mario into a given action, putting Mario through the appropriate
    * specific function if needed.
    */
    u32 set_mario_action(struct MarioState *m, u32 action, u32 actionArg) {
    switch (action & ACT_GROUP_MASK) {
    case ACT_GROUP_MOVING:
    action = set_mario_action_moving(m, action, actionArg);
    break;

    case ACT_GROUP_AIRBORNE:
    action = set_mario_action_airborne(m, action, actionArg);
    break;

    case ACT_GROUP_SUBMERGED:
    action = set_mario_action_submerged(m, action, actionArg);
    break;

    case ACT_GROUP_CUTSCENE:
    action = set_mario_action_cutscene(m, action, actionArg);
    break;
    }

    // Resets the sound played flags, meaning Mario can play those sound types again.
    m->flags &= ~(MARIO_ACTION_SOUND_PLAYED | MARIO_MARIO_SOUND_PLAYED);

    if (!(m->action & ACT_FLAG_AIR)) {
    m->flags &= ~MARIO_UNKNOWN_18;
    }

    // Initialize the action information.
    m->prevAction = m->action;
    m->action = action;
    m->actionArg = actionArg;
    m->actionState = 0;
    m->actionTimer = 0;

    return TRUE;
    }

    >has oop anyway
    >bitmasking for booleans
    the power of cniles whoaaaaa...... time to throw away 50 years of language improvements for this

Your email address will not be published. Required fields are marked *