int[] array = { 2, 6, 4, 12, 7, 8, 9, 13, 2 }; var orderedFilteredArray = from element in array where element < 7 orderby element select element; PrintArray(orderedFilteredArray, "All values less than 7 and sorted:"); TASK 1. Re-write this code using Lambda. Submit your source code and the output. TASK 2. Create an array2 that consists of your KEAN ID digits. Write a code using Lambda function to display only even numbers from array2. Submit your source code and the output

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter8: Arrays
Section: Chapter Questions
Problem 9PE
icon
Related questions
Question

int[] array = { 2, 6, 4, 12, 7, 8, 9, 13, 2 };
var orderedFilteredArray =
from element in array
where element < 7
orderby element
select element;
PrintArray(orderedFilteredArray,
"All values less than 7 and sorted:");

TASK 1. Re-write this code using
Lambda. Submit your source code and
the output.
TASK 2. Create an array2 that consists
of your KEAN ID digits. Write a code
using Lambda function to display only
even numbers from array2. Submit
your source code and the output

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT