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

📄 util.java

📁 采用JAVA开发
💻 JAVA
字号:
package com.gctech.sms.voice.common;
import com.gctech.sms.voice.*;
/**
* 工具类
 * <p>Copyright: Copyright (c) 2004</p>
 * <p>Company: </p>
 * @author lijz@gctech.com.cn
 * @version 1.0
 */
public class Util
{
  private Util()
  {
  }
  public static String randomPassword()
  {
    double d = Math.random();
    return String.valueOf((int)(d*100000));
  }

  public static String getServiceId(int price)
  {
    if(price==100)
    {
      return Config.instance().getServiceId100();
    }
    else if(price==150)
    {
      return Config.instance().getServiceid150();
    }
    else if(price == 200)
    {
      return Config.instance().getServiceId200();
    }
    else
    {
        throw new IllegalArgumentException("传入的价格错误:"+price);
    }
  }

  public static void main(String[] args) {
    String test = ".\\1\\1\\你好,hell.vox";
    test = test.replace('\\','/');
    String t = test.substring(2,test.length()-3);
    t = t+".vox";
//    System.out.println(test);
//    test = test.replaceAll(".\\","/");
//    test = test.replaceAll(".vox","wav");
    System.out.println(t);

  }

}

⌨️ 快捷键说明

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