Telegram Group & Telegram Channel
Вопрос с собеседования

В чём разница между переопределением и перегрузкой?

Ответ: Перегрузка (overloading) — это способ определить в одном классе несколько методов с одинаковым именем, но разными параметрами.

Переопределение (overriding) используется в наследовании, когда подкласс предоставляет свою реализацию метода, унаследованного от родительского класса.

Перегрузка помогает организовать разную логику под одним именем, а переопределение позволяет изменить поведение унаследованного метода.


tags: #собеседование

📱 Java Developer | Чат
Please open Telegram to view this post
VIEW IN TELEGRAM



tg-me.com/java_tg/2913
Create:
Last Update:

Вопрос с собеседования

В чём разница между переопределением и перегрузкой?

Ответ: Перегрузка (overloading) — это способ определить в одном классе несколько методов с одинаковым именем, но разными параметрами.

Переопределение (overriding) используется в наследовании, когда подкласс предоставляет свою реализацию метода, унаследованного от родительского класса.

Перегрузка помогает организовать разную логику под одним именем, а переопределение позволяет изменить поведение унаследованного метода.


tags: #собеседование

📱 Java Developer | Чат

BY Java Developer


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/java_tg/2913

View MORE
Open in Telegram


Java Developer Telegram | DID YOU KNOW?

Date: |

Mr. Durov launched Telegram in late 2013 with his brother, Nikolai, just months before he was pushed out of VK, the Russian social-media platform he founded. Mr. Durov pitched his new app—funded with the proceeds from the VK sale—less as a business than as a way for people to send messages while avoiding government surveillance and censorship.

How to Use Bitcoin?

n the U.S. people generally use Bitcoin as an alternative investment, helping diversify a portfolio apart from stocks and bonds. You can also use Bitcoin to make purchases, but the number of vendors that accept the cryptocurrency is still limited. Big companies that accept Bitcoin include Overstock, AT&T and Twitch. You may also find that some small local retailers or certain websites take Bitcoin, but you’ll have to do some digging. That said, PayPal has announced that it will enable cryptocurrency as a funding source for purchases this year, financing purchases by automatically converting crypto holdings to fiat currency for users. “They have 346 million users and they’re connected to 26 million merchants,” says Spencer Montgomery, founder of Uinta Crypto Consulting. “It’s huge.”

Java Developer from ru


Telegram Java Developer
FROM USA