abstract In Java, abstract class can have without any abstract method. However, if there is an abstract class in a class, the class must be the abstract class. The abstract class is not able to be instantiated but allow to be inherited. Moreover, by creating subclass, reference of derive class can be created. You can have a reference to an abstract class by creating some other class that derives..
SuperA super keyword refers to a parent class. Attaching () with super keyword means the constructor of the parent class. This ensures that no errors occur even if the default constructor for the parent class is lost. Example Code I1234567891011121314151617181920212223242526272829303132333435class Calculator { int a, b; public Calculator(){} //하위클래스가 호출될 때 자동으로 부모클래스의 생성자가 호출 //매개변수가 없는 기본생성자가 없..
Inheritance 상속 Inheritance in Java, it allows that a child class can acquire the features from a parent class, to avoid duplicate code and it is easy to maintain the program. 다른 클래스의 기능을 사용하고 싶을때 상속을 통해서 자식 클래스가 부모클래스의 기능을 그대로 사용할 수 있다. 그로인해 코드의 중복을 피할 수 있고 유지보수 또한 편리해지는 장점(하나가 변하면 다른 쪽도 자동으로 영향을 받기에)을 얻을 수 있다. extends keyword syntax class Bird extends Animal -> Class Bird inherits its super cla..
Constructor 1. A constructor has no return value, not even void. Constructor actually initializes the object of the class. If there is a return value, it would create an unexpected object. 첫번째, 생성자는 반환형이 선언되어 있지도, 반환형이 있지도 않다. 2. the Constructor name is the same as the class name. 두번째, 클래스의 이름과 동일하다. 3. the constructor can be overloaded여러개의 생성자가 존재할 수 있다. 4. if there is no constructor, a default..
Nested If-Else To avoid duplicated conditions and to make decisions in your program, the nested structure could be considered as a big frame of the program using If-Else statement. if else 로 문제를 접근할 때 중복조건을 피하고 우선순위를 정하기 위해 상위 하위에 속하는 구조(nested If-Else)를 먼저 파악한 후 틀을 잡고 문제를 해결 해 나갈 것! Q. Given an integer, , perform the following conditional actions:If is odd, print WeirdIf is even and in the incl..
Primitive Data Types Data Type Size Description byte 1 byte (8-bit) -128 to 127 short 2 bytes -32,768 to 32,767 int 4 bytes -2,147,483.648 to 2,147,483,647 long 8 bytes -9,223.372,036.854,775.808 to 9,223.372,036,854,775,808 float 4 bytes 6 to 7 decimal digits double 8 bytes 15 decimal digits boolean 1 byte true or false char 2 bytes a single character or letter Non-primitive Data Types Non-prim..
- Total
- Today
- Yesterday
- math.max
- math.abs
- rest parameter
- spring boot application
- javascript
- HashMap
- hackerrank
- compareTo()
- equals()
- HackerRank Algorithm
- 알고리즘
- easy algorithm
- substring()
- easy javascript algorithm
- 프로그래머스 알고리즘문제
- repeat()
- code refactoring
- algorithm
- hackerrank javascript
- C++
- hackerrank javascript solution
- Collection Framework
- string class in java
- Object type casting
- Javascript Algorithm
- 프로그래머스
- hackerrank solution
- java
- ... in Javascript
- 프로그래머스 알고리즘
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 |