Telegram Group & Telegram Channel
πŸ€” Как это Ρ€Π°Π±ΠΎΡ‚Π°Π΅Ρ‚? β€” Java: Π¦ΠΈΠΊΠ» for-each

Π’ Java Ρ†ΠΈΠΊΠ» for-each (ΠΈΠ»ΠΈ enhanced for loop) ΡƒΠΏΡ€ΠΎΡ‰Π°Π΅Ρ‚ ΠΈΡ‚Π΅Ρ€Π°Ρ†ΠΈΡŽ ΠΏΠΎ коллСкциям ΠΈ массивам. Π”Π°Π²Π°ΠΉΡ‚Π΅ посмотрим, ΠΊΠ°ΠΊ ΠΎΠ½ Ρ€Π°Π±ΠΎΡ‚Π°Π΅Ρ‚.

➑️ Как это Ρ€Π°Π±ΠΎΡ‚Π°Π΅Ρ‚:

β€’ numbers β€” это массив Ρ†Π΅Π»Ρ‹Ρ… чисСл.
β€’ Π’ строкС for (int number : numbers) пСрСмСнная number ΠΏΠΎΡΠ»Π΅Π΄ΠΎΠ²Π°Ρ‚Π΅Π»ΡŒΠ½ΠΎ ΠΏΡ€ΠΈΠ½ΠΈΠΌΠ°Π΅Ρ‚ значСния ΠΈΠ· массива numbers.
β€’ На ΠΊΠ°ΠΆΠ΄ΠΎΠΉ ΠΈΡ‚Π΅Ρ€Π°Ρ†ΠΈΠΈ выводится Ρ‚Π΅ΠΊΡƒΡ‰Π΅Π΅ Π·Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ number.

Π Π°Π·Π²Π΅Ρ€Π½ΡƒΡ‚Ρ‹ΠΉ Π°Π½Π°Π»ΠΎΠ³:
for (int i = 0; i < numbers.length; i++) {
System.out.println(numbers[i]);
}

1
2
3
4
5


Java Learning πŸ‘©β€πŸ’»
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘10



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

πŸ€” Как это Ρ€Π°Π±ΠΎΡ‚Π°Π΅Ρ‚? β€” Java: Π¦ΠΈΠΊΠ» for-each

Π’ Java Ρ†ΠΈΠΊΠ» for-each (ΠΈΠ»ΠΈ enhanced for loop) ΡƒΠΏΡ€ΠΎΡ‰Π°Π΅Ρ‚ ΠΈΡ‚Π΅Ρ€Π°Ρ†ΠΈΡŽ ΠΏΠΎ коллСкциям ΠΈ массивам. Π”Π°Π²Π°ΠΉΡ‚Π΅ посмотрим, ΠΊΠ°ΠΊ ΠΎΠ½ Ρ€Π°Π±ΠΎΡ‚Π°Π΅Ρ‚.

➑️ Как это Ρ€Π°Π±ΠΎΡ‚Π°Π΅Ρ‚:

β€’ numbers β€” это массив Ρ†Π΅Π»Ρ‹Ρ… чисСл.
β€’ Π’ строкС for (int number : numbers) пСрСмСнная number ΠΏΠΎΡΠ»Π΅Π΄ΠΎΠ²Π°Ρ‚Π΅Π»ΡŒΠ½ΠΎ ΠΏΡ€ΠΈΠ½ΠΈΠΌΠ°Π΅Ρ‚ значСния ΠΈΠ· массива numbers.
β€’ На ΠΊΠ°ΠΆΠ΄ΠΎΠΉ ΠΈΡ‚Π΅Ρ€Π°Ρ†ΠΈΠΈ выводится Ρ‚Π΅ΠΊΡƒΡ‰Π΅Π΅ Π·Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ number.

Π Π°Π·Π²Π΅Ρ€Π½ΡƒΡ‚Ρ‹ΠΉ Π°Π½Π°Π»ΠΎΠ³:

for (int i = 0; i < numbers.length; i++) {
System.out.println(numbers[i]);
}

1
2
3
4
5


Java Learning πŸ‘©β€πŸ’»

BY Java Learning




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

View MORE
Open in Telegram


Java Learning Telegram | DID YOU KNOW?

Date: |

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.”

The Singapore stock market has alternated between positive and negative finishes through the last five trading days since the end of the two-day winning streak in which it had added more than a dozen points or 0.4 percent. The Straits Times Index now sits just above the 3,060-point plateau and it's likely to see a narrow trading range on Monday.

Java Learning from us


Telegram Java Learning
FROM USA