java (9) 썸네일형 리스트형 자바 소수 java prime number 1 2 차이가 모더라;; 2가 젤빠르고 int[] 가 ArrayList랑 소요시간 비슷하나 더빠름. 메모리는 ArrayList가 낫겠지..? 첫번째 int array이용public class PrimeNumber { public static void main(String[] args) { // 1. int array long l1 = System.currentTimeMillis(); int[] a = new int[500]; int index = 0; // prime length // 1 ~ 2번째 int[]public class PrimeNumber2 { public static void main(String[] args) { long l1 = System.currentTimeM.. w3schools Java Lambda Expressions https://www.w3schools.com/java/java_lambda.asp Java Lambda Expressions W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more. www.w3schools.com w3schools Java Lambda Expressions Lambda Expressions were added in Java 8. Syntax parameter -> expression To us.. Design Pattern - Template method pattern 템플릿 메소드 패턴 my google query = template method pattern http://limkydev.tistory.com/81https://jdm.kr/blog/116 Java - 문자열 String 문자 개수 - indexOf 문자열 문자 개수 문자열에서 문자 개수 구하기문자열에서 특정 문자 개수 구하기string 문자 찾기 my google query = string 찾는 문자 갯수이것을 찾으셨나요? string 찾는 문자 개수 int lineCnt = 0; int fromIndex = -1; while ((fromIndex = cellText.indexOf("\n", fromIndex + 1)) >= 0) { lineCnt++; } 출처: java - 문자열 특정 문자 개수 구하기 - goni9071.tistory.com 출처: http://goni9071.tistory.com/entry/java-문자열-특정-문자-개수-구하기 [고니의꿈] my google query = indexof fromindex http://itpa.. Java - 숫자를 이진법으로 바꾸기 숫자를 이진법으로 치환10진법 숫자를 이진법 문자열로 바꾸기 my google query = java int to bit Print an integer in binary format in Javahttps://stackoverflow.com/questions/5263187/print-an-integer-in-binary-format-in-java int x = 100; System.out.println(Integer.toBinaryString(x)); Integer.toString(100,8) // prints 144 --octal representation Integer.toString(100,2) // prints 1100100 --binary representation Integer.toString.. java - No enclosing instance of type Main is accessible. No enclosing instance of type Main is accessible. Must qualify the allocation with an enclosing instance of type Main (e.g. x.new A() where x is an instance of Main). public class Main { public static void main(String[] args) {Solution s = new Solution(); }class Solution { public int solution(String numbers) { int answer = 0; return answer; }} } public class Main { public static void main(String.. java.lang.String.substring String java.lang.String.substring(int beginIndex, int endIndex) substringpublic String substring(int beginIndex, int endIndex)Returns a string that is a substring of this string. The substring begins at the specified beginIndex and extends to the character at index endIndex - 1. Thus the length of the substring is endIndex-beginIndex. Examples: "hamburger".substring(4, 8) returns "urge" "smiles".. java.util.Arrays.sort sortpublic static void sort(T[] a, Comparator 이전 1 2 다음