摘要: 在java中如果一个类被声明为静态的,那么只有一种情况,即这个类是内部类,外部类不能被声明为静态的。 1.静态内部类跟静态方法一样,只能访问静态的成员变量和方法,不能访问非静态的方法和属性,但是普通内部类可以访问任意外部类的成员变量和方法。 2.静态内部类可以声明普通成员变量和方法,而普通内部类不能 阅读全文
posted @ 2016-11-01 22:40 Black_Knight 阅读(1598) 评论(0) 推荐(0) 编辑
摘要: Write a program to find the n-th ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For example, 1, 2, 3, 4, 5, 阅读全文
posted @ 2016-11-01 17:21 Black_Knight 阅读(714) 评论(0) 推荐(0) 编辑
摘要: Given an integer n, return the number of trailing zeroes in n!. Note: Your solution should be in logarithmic time complexity. Credits:Special thanks t 阅读全文
posted @ 2016-11-01 15:32 Black_Knight 阅读(140) 评论(0) 推荐(0) 编辑