Telegram Group & Telegram Channel
🗣️ Одинарные и двойные кавычки

Что ты ожидаешь в результате выполнения этого кода?

public class Haha {
public static void main(String args[]) {
System.out.print("H" + "a");
System.out.print('H' + 'a');
}
}


💬 Казалось бы, строка должна возвращать «HaHa», но на самом деле это будет «Ha169».

➡️ Двойные кавычки обрабатывают символы как строки, но одинарные кавычки ведут себя иначе. Они преобразуют символьные операнды ('H' и 'a') в целые значения посредством расширения примитивных типов — получается 169.

Java Learning 👩‍💻
Please open Telegram to view this post
VIEW IN TELEGRAM



tg-me.com/Java_per_month/3529
Create:
Last Update:

🗣️ Одинарные и двойные кавычки

Что ты ожидаешь в результате выполнения этого кода?

public class Haha {
public static void main(String args[]) {
System.out.print("H" + "a");
System.out.print('H' + 'a');
}
}


💬 Казалось бы, строка должна возвращать «HaHa», но на самом деле это будет «Ha169».

➡️ Двойные кавычки обрабатывают символы как строки, но одинарные кавычки ведут себя иначе. Они преобразуют символьные операнды ('H' и 'a') в целые значения посредством расширения примитивных типов — получается 169.

Java Learning 👩‍💻

BY Java Learning




Share with your friend now:
tg-me.com/Java_per_month/3529

View MORE
Open in Telegram


Java Learning Telegram | DID YOU KNOW?

Date: |

That strategy is the acquisition of a value-priced company by a growth company. Using the growth company's higher-priced stock for the acquisition can produce outsized revenue and earnings growth. Even better is the use of cash, particularly in a growth period when financial aggressiveness is accepted and even positively viewed.he key public rationale behind this strategy is synergy - the 1+1=3 view. In many cases, synergy does occur and is valuable. However, in other cases, particularly as the strategy gains popularity, it doesn't. Joining two different organizations, workforces and cultures is a challenge. Simply putting two separate organizations together necessarily creates disruptions and conflicts that can undermine both operations.

What is Telegram?

Telegram’s stand out feature is its encryption scheme that keeps messages and media secure in transit. The scheme is known as MTProto and is based on 256-bit AES encryption, RSA encryption, and Diffie-Hellman key exchange. The result of this complicated and technical-sounding jargon? A messaging service that claims to keep your data safe.Why do we say claims? When dealing with security, you always want to leave room for scrutiny, and a few cryptography experts have criticized the system. Overall, any level of encryption is better than none, but a level of discretion should always be observed with any online connected system, even Telegram.

Java Learning from us


Telegram Java Learning
FROM USA