⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 multiplyelements.java

📁 《A first book of java》by Gary J.Bronson 北大出版社
💻 JAVA
字号:
public class MultiplyElements
{
  public static void main(String[] args)
  {
    int i;
    int nums[ ] = {2, 18, 1, 27, 16};
    changeValues(nums);  // call the method
    // display the values
    System.out.print("The values in the nums array are");
    for (i = 0; i < nums.length; i++)
      System.out.print("  " + nums[i]);
  }
  
  // multiply each element by 10
  public static void changeValues(int vals[])
  {
    int i;
    for (i = 0; i < vals.length; i++)
      vals[i] = 10*vals[i];    
  }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -