Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to use scala Loop expressions

Shulou Source: shulou.com Published: 2022-05-31 21:24:40 10月06日 Update

This article introduces the knowledge of "how to use scala loop expressions". Many people will encounter this dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Consider the following example of a while loop adapted from Chapter 2, which uses var and is therefore imperative:

1. Def printArgs (args: Array [String]): Unit = {

2. / / var (I, j) = (0,10) multivariable assignment

3. Var I = 0

4. While (I

Tags: Loops expressions content more knowledge style practicality learning next code examples functions methods variables can be passed dilemma actual situation instructions articles Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Shulou Technology Apple NVidia Linux