본문 바로가기

upcurve616

[Java 기초문법] 숫자 다루기 | Data types , double and floats 사용시 주의할 점, 진법 표현들 [Java 기초문법] by Professional Java Developer Career Starter: Java Foundations @ Udemy Data types BYTE (-128 to 127) 아스키코드에서 A가 65에 assgined 된 것을 확인했다. random하게 된 것이 아니라는 점. 컴퓨터가 글자를 숫자로 인식하는 방식의 가장 lowest level은 bits 단위를 보는 것이다. 8 bits = 1 BYTE 이진법으로 65는 8 7 6 5 4 3 2 1 128 64 32 16 8 4 2 1 0 1 0 0 0 0 0 1 Hexadecimal 에서 FACE는 ? E = 1110 C = 1100 A = 1010 F = 1111 public class NumberStuff { public.. 2022. 10. 18.
[Java 기초문법] 정규식 다루기 | Regex | transcript에서 element 추출해보기, greedy operator 사용시 주의할점, finding method [Java 기초문법] by Professional Java Developer Career Starter: Java Foundations @ Udemy Real Text Parsing import java.util.regex.Matcher; import java.util.regex.Pattern; public class TranscriptParser { public static void main(String[] args) { String transcript = """ Student Number: 1234598872 Grade: 11 Birthdate: 01/02/2000 Gender: M State ID: 8923827123 Cumulative GPA (Weighted) 3.82 Cumulative GPA.. 2022. 10. 18.
[Java 기초문법] 정규식 다루기 | Regex | 기초 표현, Capture Groups , Comments, 여러가지 표현들 [Java 기초문법] by Professional Java Developer Career Starter: Java Foundations @ Udemy Regex 기초 표현 public class RegexPractice { public static void main(String[] args) { System.out.println("cat".matches("cat")); } } 리턴 true concept of character classes System.out.println("Cat".matches("[cC]at")); MEANING => if this word starts with a lower case c or an uppercase C = > matches bracket = [] 를 사용해서 범위를.. 2022. 10. 18.
[Java 기초문법] 텍스트 다루기 | concatenation, string length, indexOf, split, startsWith & endsWith, contentEquals [Java 기초문법] by Professional Java Developer Career Starter: Java Foundations @ Udemy String Concatenation - concat public class LearnStrings { public static void main(String[] args) { String text1 = "this is my text1"; String text2 = "this is my text2"; System.out.println(text1 + text2); } } return : this is my text1this is my text2 두 스트링이 붙어있는 상태로 출력된다. text1 뒤에 빈칸을 주어서 하드코딩할 수도 있지만 해결책이 아님 애초에 .. 2022. 10. 17.
[Java 기초문법] 텍스트 다루기 | creating strings, 대소문자 변환, isEmpty vs isBlank, replace, strip(), charAt(), contains() [Java 기초문법] by Professional Java Developer Career Starter: Java Foundations @ Udemy Creating Strings 스트링을 만드는 방법 public class LearnStrings { public static void main(String[] args) { String fruit = "apple"; String vegetable = new String("broccoli"); } } 첫번째 = asks the os to give it some memory of this string. 메모리를 할당시킴 storing a reference. 스트링 literal이라고 하는 이것을 입력하면 자바는 all the string liberal을 검색.. 2022. 10. 17.