Jump to content

Recommended Posts

Guest Elfocrash
Posted

So as you might notice i deleted all of my shares in the L2j Sections. It is not a rage quit. It is because many stuff changed till the last time i wrote a code for mxc.

This means that any share that's gonna come will be a quality share and not crappy codes like my previous ones.

 

So this time i wanna explain some stuff to the l2j community which might have noticed but i doubt that they know.

 

I will talk about Inheritance.

 

What is Inheritance?

 

[*]Inheritance is a mechanism wherein a new class is derived from an existing class.

[*]Software reusability in which new classes are created from existing classes.

 

 

Advantages:

Saves time in program development.

It encourages the reuse of proven and debuffed high-quality software.

 

Inheritance explained.

A new class can inherit the data members and methods of previously defined class called base class.

The new class is called derived class.

With single inheritance, a class is derived from one base class

With multiple inheritance, a class is derived from multiple base classes. (However multiple inheritance in Java is not really common and it is

provided by protocols and interfaces mostly.)

A derived class can add data members and member methods on it's own so it can be larger than its base class.

A derived class is more specific than its base class and represents a smaller group of objects.

In the derived class we can define additions, replacements or refinements of the features inherited from the base class.

 

"Is a" and "Has a" Relationship explained

Inheritance and composition are the two ways of defining new classes using existing classes.

In an “is a” relationship, an object of the derived class can also be treated as an object of the base-class type.  The new class “is a kind of” existing class.

“Is a” is inheritance.

Example: circle “is a” shape.

In a “has a” relationship, a class has one or more objects of other classes as members.

“Has a” is composition .

Example: employee “has a” birth date, employment date.

 

Base Classes and Derived Classes

Base class: Shape

Derived classes:

  • Circle
  • Triangle
  • Rectangle

 

 

Derive class. How it looks like?

 

class Triangle extends Shape {

    // new fields and methods defining 
    // a triangle goes here

}

 

private members of the base class are not accessible in the derived class.

The public and protected members of the base class are inherited as public and protected members of the derived class.

 

Overriding a Method

 

An instance method in a subclass with the same signature and return type as an instance method in the superclass overrides the superclass's method.

 

The ability of a subclass to override a method allows a class to inherit from a superclass whose behavior is "close enough" and then to modify behavior as needed. The overriding method has the same name, number and type of parameters, and return type as the method it overrides. An overriding method can also return a subtype of the type returned by the overridden method. This is called a covariant return type.

 

When overriding a method, you might want to use the @Override annotation that instructs the compiler that you intend to override a method in the superclass. If, for some reason, the compiler detects that the method does not exist in one of the superclasses, it will generate an error.

 

 

Reference: http://docs.oracle.com/javase/tutorial/java/IandI/override.html

 

That's a short and basic guide to explain what inheritance is. Even if a simple weapon it can be really powerful if you use it properly.

Guest Elfocrash
Posted

That's 0.001% of what I had to study for my exam ( All stuff related to OOP )

You really dont wanna see what i had to study for my exams on C++ and OOP :)

Guest Elfocrash
Posted

It actually was a rage quit, but it happends to everyone, no worries.

I did want to get demoted and people of  my daily company like Finito and Noble did know it. Don't really give a shit for what people think btw.

Just explaining how it is.

 

Also, l2j section is not the best possible choice for a java guide.

Oh and it is because it is meant to be used for L2j purposes.

Posted

Firstly, newboston is retarded.

 

Secondly, you don't need to talk about inheritance, and you will never should use OOP widely in large programs. Like l2j or game engines.

Some senior developers are so anti OOP, that they resort to massive reflection factory just to not deal with the memory consumption of the inherited reference.

 

Thirdly, this is not something to like, show off dude, its kinda..uh really newbish? That's like the first class you get, and if your teachers ever told you that OOP is best for everything, then you should consider telling them to shove it up their ass.

 

In conclusion, yeah its smth for newbies, but this is the problem here, your Guide was short and there are alot of newbie developers like newboston that was coming from other languages or from 0, and blaming the language of being slow and retarded and impossible to work with, just cause they saw a tutorial and they are so closed minded to believe only in urs since theres alot of ass kissing in here. Opinions should always be debated, not accepted from the start in any way, direct or indirect.

 

I saw that retard newboston sorting LinkedLists, what the shit? The action is retarded but the way he referred to it and its usability was simply cretinous, retarded, stupid, the guy should die.

Guest Elfocrash
Posted

Thirdly, this is not something to like, show off dude, its kinda..uh really newbish? That's like the first class you get, and if your teachers ever told you that OOP is best for everything, then you should consider telling them to shove it up their ass.

It is meant to be newbish and yeah it is only the basic idea nothing more. Do you really think that someone can demonstrate something more in mxc and expect from the community to

understand. Look at this. There is not one serious reply apart from yours. Btw thanks for the reply.

Posted

Firstly, newboston is retarded.

 

Secondly, you don't need to talk about inheritance, and you will never should use OOP widely in large programs. Like l2j or game engines.

Some senior developers are so anti OOP, that they resort to massive reflection factory just to not deal with the memory consumption of the inherited reference.

 

Thirdly, this is not something to like, show off dude, its kinda..uh really newbish? That's like the first class you get, and if your teachers ever told you that OOP is best for everything, then you should consider telling them to shove it up their ass.

 

In conclusion, yeah its smth for newbies, but this is the problem here, your Guide was short and there are alot of newbie developers like newboston that was coming from other languages or from 0, and blaming the language of being slow and retarded and impossible to work with, just cause they saw a tutorial and they are so closed minded to believe only in urs since theres alot of ass kissing in here. Opinions should always be debated, not accepted from the start in any way, direct or indirect.

 

I saw that retard newboston sorting LinkedLists, what the shit? The action is retarded but the way he referred to it and its usability was simply cretinous, retarded, stupid, the guy should die.

This dude knows how to create beer and wine, what are you talking about?
Posted

It is meant to be newbish and yeah it is only the basic idea nothing more. Do you really think that someone can demonstrate something more in mxc and expect from the community to

understand. Look at this. There is not one serious reply apart from yours. Btw thanks for the reply.

I think you right, i tend to think i live on a different planet sometimes, with high hopes :P

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • Tell a Škoda 1.4 driver that a Škoda 1.8 is faster — and suddenly, you’re riding a mini race car. On the way, they might share random stories — gas prices, the perfect BBQ recipe, or how passengers once called them “just for a minute.” Maybe even how someone left a suitcase full of money in their car once.     The important part? You’ll get there on time, no delays.     Vibe SMS works just as fast — messages fly like that driver who just heard their 1.8 isn’t the fastest.     🌐 https://vibe-sms.net/ 📲 https://t.me/vibe_sms  
    • ⚔️ The Grand Opening Has Arrived! ⚔️ In just a few hours the gate to the eternal battlefield will be open and the war between Order and Chaos will be set once again ! Its time to claim your destiny 🔥 👉 Register now and join the fight today! 🌐 https://l2ovc.com register now : https://l2ovc.com The gates are open the war between Order and Chaos has officially started! 🔥 Join the battlefield NOW and claim your destiny in Order vs Chaos! 💥 Don’t fall behind your faction needs you. ➡️ https://l2ovc.com  
    • Don’t miss the new Telegram gifts with our Telegram Stars purchasing bot! A great opportunity to invest in a stable digital asset at an early stage while the market is still forming. Buy other existing gifts in the official store using Telegram Stars, pay for subscriptions, donate to games and projects, pay for Premium subscriptions, and react to messages in channels! Low prices, multiple payment options, and other cool unique features! ⚡ Try it today — SOCNET STARS BOT ⚡ Active links to SOCNET stores: Digital Goods Store (Website): Go Store Telegram Bot: Go – convenient access to the store via Telegram messenger. ⭐ Telegram Stars Purchase Bot: Go – fast and profitable way to buy stars in Telegram. SMM Panel: Go – promote your social media accounts. We present to you the current list of promotions and special offers for purchasing our products and services: 1️⃣ Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, bot) in October! You can also use the promo code SOCNET (15% discount) for your first purchase. 2️⃣ Get $1 on your store balance or a 10–20% discount — just write your username after registration on our website using the template: "SEND ME BONUS, MY USERNAME IS..." — post it in our forum thread! 3️⃣ Get $1 for your first SMM Panel trial — simply open a ticket titled “Get Trial Bonus” on our website (Support). 4️⃣ Weekly ⭐ Telegram Stars giveaways in our Telegram channel and in our Telegram Stars bot! News: ➡ Telegram Channel: https://t.me/accsforyou_shop ➡ WhatsApp Channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord Server: https://discord.gg/y9AStFFsrh Contacts and Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Don’t miss the new Telegram gifts with our Telegram Stars purchasing bot! A great opportunity to invest in a stable digital asset at an early stage while the market is still forming. Buy other existing gifts in the official store using Telegram Stars, pay for subscriptions, donate to games and projects, pay for Premium subscriptions, and react to messages in channels! Low prices, multiple payment options, and other cool unique features! ⚡ Try it today — SOCNET STARS BOT ⚡ Active links to SOCNET stores: Digital Goods Store (Website): Go Store Telegram Bot: Go – convenient access to the store via Telegram messenger. ⭐ Telegram Stars Purchase Bot: Go – fast and profitable way to buy stars in Telegram. SMM Panel: Go – promote your social media accounts. We present to you the current list of promotions and special offers for purchasing our products and services: 1️⃣ Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, bot) in October! You can also use the promo code SOCNET (15% discount) for your first purchase. 2️⃣ Get $1 on your store balance or a 10–20% discount — just write your username after registration on our website using the template: "SEND ME BONUS, MY USERNAME IS..." — post it in our forum thread! 3️⃣ Get $1 for your first SMM Panel trial — simply open a ticket titled “Get Trial Bonus” on our website (Support). 4️⃣ Weekly ⭐ Telegram Stars giveaways in our Telegram channel and in our Telegram Stars bot! News: ➡ Telegram Channel: https://t.me/accsforyou_shop ➡ WhatsApp Channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord Server: https://discord.gg/y9AStFFsrh Contacts and Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock