- public class TestMethod1
- {
- public static void main(String[] args)
- {
- double num;
- num=show_length(22,55);
- System.out.print("\\n");
- System.out.println("Length is "+num);
- }
- public static double show_length(int m,int n)
- {
- return Math.sqrt(m*m+n*n);
- }
- }
- //该片段来自于http://www.codesnippet.cn/detail/0112201411122.html
来源: http://www.codesnippet.cn/detail/0112201411122.html