Java String Divide divide(String ts, String ms)

Here you can find the source of divide(String ts, String ms)

Description

divide

License

Open Source License

Declaration

public static Double divide(String ts, String ms) 

Method Source Code

//package com.java2s;
/*//from www .ja  v  a 2 s  .c  o  m
 * Copyright (C) 2010 Viettel Telecom. All rights reserved.
 * VIETTEL PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */

public class Main {
    public static Double divide(String ts, String ms) {
        if ("0".equals(ms)) {
            return 0D;
        } else {
            return Double.parseDouble(ts) / Double.parseDouble(ms);
        }
    }
}

Related

  1. div(String text)
  2. divide(final String s)
  3. divide(Object o1, Object o2, String type)
  4. divide(String m)
  5. divide(String str, char c)
  6. divide(String type)
  7. divideFullName(final String fullName)