JAVA_CODINGS Telegram 64
44. Array operations.

class ArrayOperations
{
public static void main(String[] args)
{
double[] myList = {1.9, 2.9, 3.4, 3.5};

// Print all the array elements
for (int i = 0; i < myList.length; i++)
{
System.out.println(myList[i] + " ");
}
// Summing all elements
double total = 0;
for (int i = 0; i < myList.length; i++)
{
total += myList[i];
}

System.out.println("Total is " + total);

// Finding the largest element
double max = myList[0];
for (int i = 1; i < myList.length; i++)
{
if (myList[i] > max)
max = myList[i];
}

System.out.println("Max is " + max);
}
}

@java_codings



tgoop.com/java_codings/64
Create:
Last Update:

44. Array operations.

class ArrayOperations
{
public static void main(String[] args)
{
double[] myList = {1.9, 2.9, 3.4, 3.5};

// Print all the array elements
for (int i = 0; i < myList.length; i++)
{
System.out.println(myList[i] + " ");
}
// Summing all elements
double total = 0;
for (int i = 0; i < myList.length; i++)
{
total += myList[i];
}

System.out.println("Total is " + total);

// Finding the largest element
double max = myList[0];
for (int i = 1; i < myList.length; i++)
{
if (myList[i] > max)
max = myList[i];
}

System.out.println("Max is " + max);
}
}

@java_codings

BY Advance Java πŸ‘¨β€πŸ’»


Share with your friend now:
tgoop.com/java_codings/64

View MORE
Open in Telegram


Telegram News

Date: |

Telegram Channels requirements & features SUCK Channel Telegram Matt Hussey, editorial director at NEAR Protocol also responded to this news with β€œ#meIRL”. Just as you search β€œBear Market Screaming” in Telegram, you will see a Pepe frog yelling as the group’s featured image. How to Create a Private or Public Channel on Telegram? How to create a business channel on Telegram? (Tutorial)
from us


Telegram Advance Java πŸ‘¨β€πŸ’»
FROM American