yangwenxiang
package com.bdqn;

import java.util.Random;

public class TelephooneNumber {
    public static void main(String[] args) {
        Random random = new Random();
        int[] nums = new int[10];
        for(int i = 0 ; i < 9; i++){
            System.out.print(1);
            for(int j = 0; j <10 ;j++){
                 if(j == 0){
                     nums[j] = random.nextInt(7)+3;
                     System.out.print(nums[j]);
                     continue;
                 }
                 nums[j] = random.nextInt(10);
                System.out.print(nums[j]);
            }
            System.out.println();
        }
    }
}

运行结果:

 

分类:

技术点:

相关文章:

  • 2021-12-23
  • 2021-07-02
  • 2021-10-11
  • 2021-08-15
  • 2022-12-23
  • 2021-09-20
  • 2021-09-01
  • 2021-08-12
猜你喜欢
  • 2022-01-02
  • 2022-01-02
  • 2021-12-23
  • 2022-01-02
  • 2021-12-23
  • 2021-12-12
相关资源
相似解决方案