List list = new ArrayList(); This declaration enables to use methods including List interface. It allows to to modify your code to another, such as LinkedList or any other List so that, this declaration is the most used one. ArrayList list = new ArrayList();Whereas, if you use this second declaration, It stores ArrayList methods only. You have to change your code whenever you modify your ArrayLi..
Upcasting Upcasting is casting from a subclass to superclass. When a superclass variable contains a reference to a subclass object, and that reference is used to call a method, the subclass version of the method is called. Student s = new Student (); Person p = (person)s; ↓ Person p = new Student();Reference variable object Upcasting happens if you want to reuse your code that knows about the su..
String class in java - case sensitive (lower case gives an error)- no need 'new' keyword - It restricts the creation of a string instance consisting of the same string.- It does not allow changes to the data in the String instance. If you want to make variables that hold the strings, you need to create object first. 1234567class Student{ public static void main(String[] args) { String hello = ne..
Collection Framework collection framework is a collection providing an architecture to store the group of objects.Java primitive types are not considered objects. Since Java collections only store objects, primitive types are not allowed to store. Thus, we need wrapper class or autoboxing to store data. Interfaces - Set,List,Queue,DequeClasses - ArrayList, Vector, LinkedList,HashSet,LinkedHashSe..
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..
toStringsuperclass called Object class has toString() method which converts data(mostly numbers) to string.When System.out.printlf and System.out.print have reference to an object instead of actual string, they call toString method so, the toString method print the string. It describes the object. 객체가 가진 값을 문자열로 리턴하는 메서드. 객체를 리턴할 때 보여주고자 하는 방식으로 method를 오버라이드해서 보여줄 수 있다. 아래의 예시처럼 단순히 숫자만 불러오는 것이..
- Total
- Today
- Yesterday
- hackerrank javascript solution
- HashMap
- javascript
- C++
- easy algorithm
- algorithm
- 프로그래머스 알고리즘문제
- 알고리즘
- easy javascript algorithm
- equals()
- 프로그래머스 알고리즘
- hackerrank javascript
- hackerrank
- Object type casting
- hackerrank solution
- repeat()
- Javascript Algorithm
- java
- string class in java
- code refactoring
- math.abs
- 프로그래머스
- Collection Framework
- math.max
- spring boot application
- compareTo()
- substring()
- HackerRank Algorithm
- rest parameter
- ... 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 |