<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>KatiaSoft</title>
    <link>https://katiasoft.tistory.com/</link>
    <description></description>
    <language>ko</language>
    <pubDate>Sat, 20 Jun 2026 15:47:38 +0900</pubDate>
    <generator>TISTORY</generator>
    <ttl>100</ttl>
    <managingEditor>katia</managingEditor>
    <image>
      <title>KatiaSoft</title>
      <url>https://tistory1.daumcdn.net/tistory/6147622/attach/c4b2d52a90364dcc84c946d412f4978e</url>
      <link>https://katiasoft.tistory.com</link>
    </image>
    <item>
      <title>Spring과 Spring Boot 차이점</title>
      <link>https://katiasoft.tistory.com/89</link>
      <description>&lt;p data-ke-size=&quot;size18&quot;&gt;&lt;b&gt;◎&amp;nbsp; 핵심 차이 요약&lt;/b&gt;&lt;/p&gt;
&lt;table style=&quot;border-collapse: collapse; width: 100%; height: 168px;&quot; border=&quot;1&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;tbody&gt;
&lt;tr style=&quot;height: 21px;&quot;&gt;
&lt;td style=&quot;width: 14.1473%; height: 21px;&quot;&gt;구분&lt;/td&gt;
&lt;td style=&quot;width: 40.4263%; height: 21px; text-align: left;&quot;&gt;Spring Framework&lt;/td&gt;
&lt;td style=&quot;width: 45.4263%; height: 21px; text-align: left;&quot;&gt;Spring Boot&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;height: 21px;&quot;&gt;
&lt;td style=&quot;width: 14.1473%; height: 21px;&quot;&gt;목적&lt;/td&gt;
&lt;td style=&quot;width: 40.4263%; height: 21px;&quot;&gt;자바 기반 엔터프라이즈 애플리케이션 개발&lt;/td&gt;
&lt;td style=&quot;width: 45.4263%; height: 21px;&quot;&gt;Spring 설정을 간소화하고 빠른 개발 지원&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;height: 21px;&quot;&gt;
&lt;td style=&quot;width: 14.1473%; height: 21px;&quot;&gt;설정&lt;/td&gt;
&lt;td style=&quot;width: 40.4263%; height: 21px;&quot;&gt;수동 설정 많음(XML, JavaConfig)&lt;/td&gt;
&lt;td style=&quot;width: 45.4263%; height: 21px;&quot;&gt;자동설정(Auto Configuration)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;height: 21px;&quot;&gt;
&lt;td style=&quot;width: 14.1473%; height: 21px;&quot;&gt;서버&lt;/td&gt;
&lt;td style=&quot;width: 40.4263%; height: 21px;&quot;&gt;WAR, 패키징 후 외부 톰캣 배포&lt;/td&gt;
&lt;td style=&quot;width: 45.4263%; height: 21px;&quot;&gt;내장 톰캣(서버내장) &amp;rarr; 실행만 하면 동작&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;height: 21px;&quot;&gt;
&lt;td style=&quot;width: 14.1473%; height: 21px;&quot;&gt;프로젝트 구조&lt;/td&gt;
&lt;td style=&quot;width: 40.4263%; height: 21px;&quot;&gt;개발자가 직접 구성&lt;/td&gt;
&lt;td style=&quot;width: 45.4263%; height: 21px;&quot;&gt;초기 템플릿 제공&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;height: 21px;&quot;&gt;
&lt;td style=&quot;width: 14.1473%; height: 21px;&quot;&gt;의존성 관리&lt;/td&gt;
&lt;td style=&quot;width: 40.4263%; height: 21px;&quot;&gt;수동으로 버전 명시&lt;/td&gt;
&lt;td style=&quot;width: 45.4263%; height: 21px;&quot;&gt;의존성 자동 관리&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;height: 21px;&quot;&gt;
&lt;td style=&quot;width: 14.1473%; height: 21px;&quot;&gt;실행 방식&lt;/td&gt;
&lt;td style=&quot;width: 40.4263%; height: 21px;&quot;&gt;메인 메서드 없음(톰켓에서 배포)&lt;/td&gt;
&lt;td style=&quot;width: 45.4263%; height: 21px;&quot;&gt;main()으로 실행 가능&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;height: 21px;&quot;&gt;
&lt;td style=&quot;width: 14.1473%; height: 21px;&quot;&gt;복잡도&lt;/td&gt;
&lt;td style=&quot;width: 40.4263%; height: 21px;&quot;&gt;복잡함, 설정이 많음&lt;/td&gt;
&lt;td style=&quot;width: 45.4263%; height: 21px;&quot;&gt;간편함, 생산성 높음&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;</description>
      <category>SpringBoot</category>
      <author>katia</author>
      <guid isPermaLink="true">https://katiasoft.tistory.com/89</guid>
      <comments>https://katiasoft.tistory.com/89#entry89comment</comments>
      <pubDate>Mon, 19 May 2025 13:45:44 +0900</pubDate>
    </item>
    <item>
      <title>[Shell Script] 1. 정의와 개념</title>
      <link>https://katiasoft.tistory.com/88</link>
      <description>&lt;p data-ke-size=&quot;size16&quot;&gt;(1) Shell Script 란?&lt;/p&gt;
&lt;ul style=&quot;list-style-type: circle;&quot; data-ke-list-type=&quot;circle&quot;&gt;
&lt;li&gt;Shell Script는 리눅스 및 유닉스 시스템에서 사용되는 스크립트 프로그래밍 언어 이다.&lt;/li&gt;
&lt;li&gt;사용하면 커맨드 라인 인터페이스를 통해 명령어와 스크립트를 작성하여 실행할 수 있다.&lt;/li&gt;
&lt;li&gt;Shell Script는 일련의 명령어와 제어 구조가 포함된 텍스트 파일이다.&lt;/li&gt;
&lt;li&gt;Shell Script를 사용하면 일련의 명령어를 순차적으로 실행하거나, 반복문과 조건문을 사용하여 특정조건에 따라 분가하고 제어 할 수 있다.&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;(2) 주요 개념&lt;/p&gt;
&lt;ul style=&quot;list-style-type: circle;&quot; data-ke-list-type=&quot;circle&quot;&gt;
&lt;li&gt;쉘(Shell) : 사용자와 운영체제간의 인터페이스 역할을 한다, 사용자가 명령어를 입력하면 쉘은 해당 명령어를 해석하고 운영체제에 전달한다.(대표적인 쉘로는 Bash, sh, ksh, csh 등)&lt;/li&gt;
&lt;li&gt;주석(comment) : 주석은 스크립트내에 설명을 추가하는데 사용된다. 주석은 실행되지 않으며, 코드의 가독성을 높이고 다른 사람과 코드를 공유할 때 도움이 된다.(&quot;#&quot;을 사용)&lt;/li&gt;
&lt;li&gt;변수(Variable) : 변수는 값을 저장 하기 위해 사용된다. 변수는 스크립트 내에서 값을 할당하고 참조 할 수 있으며, 변수명은 대소문자로 구분한다.(변수 정의시 &quot;=&quot;을 사용, 변수를 참조시 &quot;$&quot; 기호 사용)&lt;/li&gt;
&lt;li&gt;명령어 실행(Commend Execution) : 쉘 스크립트에서는 명령어를 실행할 수 있다, 명령어는 스크립트내에서 실행되며, 실행 결과를 변수에 할당하거나 화면에 출력할 수 있다.(명령어는 주로 &quot;`&quot;이나 &quot;$()&quot;을 사용)&lt;/li&gt;
&lt;li&gt;조건문(Conditional Statement) : 조건문은 특정 조건에 따라 스크립트의 흐름을 제어하는 데 사용한다.&lt;/li&gt;
&lt;li&gt;반복문(Looping) : 반복문은 스크립트에서 일련의 작업을 반복적으로 수행하는 데 사용한다.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;함수(Function) : 함수는 코드의 재사용성을 높이기위해 사용한다.&lt;/li&gt;
&lt;li&gt;입출력 리다이렉션(input/output Redirection) : 입출력 리다이렉션은 명령어의 입력 및 출력을 다른곳으로 리디렉션하는 기능이다.(&quot;&amp;gt;&quot;을 사용하여 리다이렉션하거나 &quot;&amp;lt;&quot;을 사용하여 파일로 부터 입력을 받을 수 있다.)&lt;/li&gt;
&lt;li&gt;파라미터(Parameter) : 스크립트에는 실행시 전달되는 파라미터를 사용할 수 있다.(&quot;$1&quot;, &quot;$2&quot;, &quot;$3&quot; 형식으로 &quot;$&quot;에 숫자를 붙힌다.)&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;</description>
      <category>Shell Script</category>
      <author>katia</author>
      <guid isPermaLink="true">https://katiasoft.tistory.com/88</guid>
      <comments>https://katiasoft.tistory.com/88#entry88comment</comments>
      <pubDate>Tue, 6 Feb 2024 14:34:19 +0900</pubDate>
    </item>
    <item>
      <title>[Java] List 인터페이스</title>
      <link>https://katiasoft.tistory.com/87</link>
      <description>&lt;h1&gt;List 인터페이스&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;List&amp;lt;E&amp;gt;&lt;/code&gt;(&lt;code&gt;java.util.List&amp;lt;E&amp;gt;&lt;/code&gt;)는 순서가 있는 인자을 가지는 자료 구조에 대한 인터페이스이다.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;List 객체 메서드&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;List 인터페이스를 상속받는 클래스와 인터페이스는 아래 객체 메서드를 가진다.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;add(int i, E e)&lt;/code&gt; : &lt;code&gt;i&lt;/code&gt; 순번이 될 수 있도록 &lt;code&gt;e&lt;/code&gt;를 인자로 추가한다, 원래 순번이 &lt;code&gt;i&lt;/code&gt;이상인 인자의 순번은 1씩 밀린다.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;get(int i )&lt;/code&gt; : 순번이 &lt;code&gt;i&lt;/code&gt;인 인자를 반환한다.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;indexOf(Object o)&lt;/code&gt; : 인자중 &lt;code&gt;o&lt;/code&gt;와 동일하거나 &lt;code&gt;equals()&lt;/code&gt;에 대해 &lt;code&gt;true&lt;/code&gt;인 첫번째 인자의 순번을 반환한다. 없다면 &lt;code&gt;-1&lt;/code&gt;을 반환한다.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;lastIndexOf(Object o)&lt;/code&gt; : 인자중 &lt;code&gt;o&lt;/code&gt;와 동일하거나 &lt;code&gt;equals()&lt;/code&gt;에 대해 &lt;code&gt;true&lt;/code&gt;인 마지막 인자의 순번을 반환한다. 없다면 &lt;code&gt;-1&lt;/code&gt;을 반환한다.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;remove(int i)&lt;/code&gt; : 순번이 &lt;code&gt;i&lt;/code&gt;인 인자를 제거한다. 보다 뒤에 있는 모든 인자의 순번은 1씩 당겨진다.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;set(int i, E e)&lt;/code&gt; : 순번이 &lt;code&gt;i&lt;/code&gt;인 인자를 &lt;code&gt;e&lt;/code&gt;로 대체 한다.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;List 인터페이스 종류&lt;/h2&gt;
&lt;h3&gt;(1)ArrayList&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ArrayList&amp;lt;E&amp;gt; (java.util.ArrayList&amp;lt;E&amp;gt;)&lt;/code&gt; : 각 인자를 일반 배열처럼 관리하기 때문에 제공된 순번에 따른 인자 접근은 매우 빠르지만, 인자 제거 및 추가 등 배열의 길이가 변하는 경우가 속도가 매우 느리다.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;(2)Vector&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Vector&amp;lt;E&amp;gt; (java.util.Vector&amp;lt;E&amp;gt;)&lt;/code&gt; : &lt;code&gt;ArrayList&amp;lt;E&amp;gt;&lt;/code&gt;와 동일하지만 동기화(&lt;code&gt;synchronized&lt;/code&gt;)되어 있다.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;(3)LinkedList&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;LinkedList&amp;lt;E&amp;gt; (java.util.LinkedList&amp;lt;E&amp;gt;)&lt;/code&gt; : 각 인자의 존재를 각 인자에 인접한 인자를 인식하게 함으로써 각 인자를 관리한다. 이 때문에, 제공된 순번에 따른 인자 접근이 매우 느리지만, 인자 제거 및 추가 등 배열의 길이가 변하는 경우 속도가 매우 빠르다.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;(4)Stack&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Stack&amp;lt;E&amp;gt; (java.util.Stack&amp;lt;E&amp;gt;)&lt;/code&gt; : 후입선출(LIFO, Last in First Out) 방식으로 인자를 관리한다.(Push/Pop)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;List 예시&lt;/h2&gt;
&lt;pre&gt;&lt;code class=&quot;language-java&quot;&gt;import java.util.ArrayList;
public class Main{
    public static void main(String[] args) {
        ArrayList&amp;lt;String&amp;gt; students = new ArrayList&amp;lt;&amp;gt;();
        // 값을 추가(삽입)
        students.add(&amp;quot;김&amp;quot;);
        students.add(&amp;quot;이&amp;quot;);
        students.add(&amp;quot;박&amp;quot;);
        students.add(&amp;quot;최&amp;quot;);
        // 값을 제거
        students.remove(3);     // 인덱스로 제거
        students.remove(&amp;quot;박&amp;quot;);   // 값을 비교하여 삭제
        // 값을 출력
        System.out.println(students);

        /*
            다른 방식의 값 추가
            ArrayList&amp;lt;String&amp;gt; students = new ArrayList&amp;lt;&amp;gt;() {{
                add(&amp;quot;김&amp;quot;);
                add(&amp;quot;이&amp;quot;);
                add(&amp;quot;박&amp;quot;);
                add(&amp;quot;최&amp;quot;);
            }};
        */
    }
}&lt;/code&gt;&lt;/pre&gt;</description>
      <category>JAVA/클래스&amp;amp;인터페이스</category>
      <author>katia</author>
      <guid isPermaLink="true">https://katiasoft.tistory.com/87</guid>
      <comments>https://katiasoft.tistory.com/87#entry87comment</comments>
      <pubDate>Mon, 10 Apr 2023 20:22:30 +0900</pubDate>
    </item>
    <item>
      <title>[Java] Double 클래스</title>
      <link>https://katiasoft.tistory.com/86</link>
      <description>&lt;h1&gt;Double 클래스&lt;/h1&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;&lt;code&gt;Double&lt;/code&gt;(&lt;code&gt;java.lang.Double&lt;/code&gt;)클래스는 실수와 관련된 편의 기능을 제공하고, 해당 타입 자체가 (&lt;code&gt;double&lt;/code&gt; 처럼) 실수 리터럴로 작동 할 수 있다.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Double&lt;/code&gt;타입은 참조 타입입에 유의한다.(&lt;code&gt;null&lt;/code&gt;을 가질 수 있음)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 data-ke-size=&quot;size26&quot;&gt;정적 멤버 변수&lt;/h2&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;(중요)&lt;code&gt;MAX_VALUE&lt;/code&gt; : &lt;code&gt;double&lt;/code&gt;타입이 가질 수 있는 최댓값이다.&lt;/li&gt;
&lt;li&gt;(중요)&lt;code&gt;MIN_VALUE&lt;/code&gt; : &lt;code&gt;double&lt;/code&gt;타입이 가질 수 있는 최솟값이다.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;NaN&lt;/code&gt; : 숫자가 아닌 값(Not a Number)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;NEGATIVE_INFINITY&lt;/code&gt; : 음의 무한수.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;POSITIVE_INFINITY&lt;/code&gt; : 양의 무한수.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 data-ke-size=&quot;size26&quot;&gt;정적 메서드&lt;/h2&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;&lt;code&gt;isFinite(double d)&lt;/code&gt; : 실수 &lt;code&gt;d&lt;/code&gt;가 유한한가의 여부를 반환한다.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;isInfinite(double d)&lt;/code&gt; : 실수 &lt;code&gt;d&lt;/code&gt;가 무한한가의 여부를 반환한다.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;isNaN(double d)&lt;/code&gt; : 실수 &lt;code&gt;d&lt;/code&gt;가 &lt;code&gt;NaN&lt;/code&gt;인가의 여부를 반환한다.&lt;/li&gt;
&lt;li&gt;(중요)&lt;code&gt;parseDouble(String s)&lt;/code&gt; : 문자열 &lt;code&gt;s&lt;/code&gt;를 실수로 반환한다.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;toString(double d)&lt;/code&gt; : 정수 &lt;code&gt;d&lt;/code&gt;를 문자열로 반환한다.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 data-ke-size=&quot;size26&quot;&gt;객체 메서드&lt;/h2&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;&lt;code&gt;byteValue()&lt;/code&gt; : 객체가 가진 실수값을 &lt;code&gt;byte&lt;/code&gt;타입으로 반환한다.(&lt;code&gt;double&lt;/code&gt; &amp;gt; &lt;code&gt;byte&lt;/code&gt; 강제 형변환)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;doubleValue()&lt;/code&gt; : 객체가 가진 실수값을 &lt;code&gt;double&lt;/code&gt;타입으로 반환한다.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;equals(Object o)&lt;/code&gt; : 객체에 전달된 &lt;code&gt;o&lt;/code&gt;와 같은가의 여부를 반환한다.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;floatValue()&lt;/code&gt; : 객체가 가진 실수값을 &lt;code&gt;float&lt;/code&gt;타입으로 반환한다.(&lt;code&gt;double&lt;/code&gt; &amp;gt; &lt;code&gt;float&lt;/code&gt; 강제 형변환)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;intValue()&lt;/code&gt; : 객체가 가진 실수값을 &lt;code&gt;int&lt;/code&gt;타입으로 반환한다.(&lt;code&gt;double&lt;/code&gt; &amp;gt; &lt;code&gt;int&lt;/code&gt; 강제 형변환)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;isInfinite()&lt;/code&gt; : 객체가 가진 실수 값이 무한한가의 여부를 반환한다.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;isNaN()&lt;/code&gt; : 객체가 가진 실수 값이 &lt;code&gt;NaN&lt;/code&gt;인가의 여부를 반환한다.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;longValue()&lt;/code&gt; : 객체가 가진 실수값을 &lt;code&gt;long&lt;/code&gt;타입으로 반환한다.(&lt;code&gt;double&lt;/code&gt; &amp;gt; &lt;code&gt;long&lt;/code&gt; 강제 형변환)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;shortValue()&lt;/code&gt; : 객체가 가진 실수값을 &lt;code&gt;short&lt;/code&gt;타입으로 반환한다.(&lt;code&gt;double&lt;/code&gt; &amp;gt; &lt;code&gt;short&lt;/code&gt; 강제 형변환)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;toString()&lt;/code&gt; : 객체가 가진 실수값을 문자열로 반환한다.&lt;/li&gt;
&lt;/ul&gt;</description>
      <category>JAVA/클래스&amp;amp;인터페이스</category>
      <author>katia</author>
      <guid isPermaLink="true">https://katiasoft.tistory.com/86</guid>
      <comments>https://katiasoft.tistory.com/86#entry86comment</comments>
      <pubDate>Mon, 10 Apr 2023 20:12:10 +0900</pubDate>
    </item>
    <item>
      <title>[Java] Long 클래스</title>
      <link>https://katiasoft.tistory.com/85</link>
      <description>&lt;h1&gt;Long 클래스&lt;/h1&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;&lt;code&gt;Long&lt;/code&gt;(&lt;code&gt;java.lang.Long&lt;/code&gt;)클래스는 큰 정수(&lt;code&gt;long&lt;/code&gt;)과 관련된 편의 기능을 제공하고, 해당 타입 자체가 (&lt;code&gt;long&lt;/code&gt;처럼) 큰 정수 리터럴로 작동할 수 있다.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Long&lt;/code&gt;은 참조 타입임을 유의한다.(&lt;code&gt;null&lt;/code&gt; 허용)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 data-ke-size=&quot;size26&quot;&gt;정적 멤버 변수&lt;/h2&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;(중요)&lt;code&gt;MAX_VALUE&lt;/code&gt; : &lt;code&gt;long&lt;/code&gt;타입이 가질 수 있는 최댓값이다.&lt;/li&gt;
&lt;li&gt;(중요)&lt;code&gt;MIN_VALUE&lt;/code&gt; : &lt;code&gt;long&lt;/code&gt;타입이 가질 수 있는 최솟값이다.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 data-ke-size=&quot;size26&quot;&gt;정적 메서드&lt;/h2&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;(중요)&lt;code&gt;parseLong(String s)&lt;/code&gt; : 문자열 &lt;code&gt;s&lt;/code&gt;를 큰 정수로 변환하여 반환한다.&lt;/li&gt;
&lt;li&gt;(중요)&lt;code&gt;parseLong(String s, int radix)&lt;/code&gt; : &lt;code&gt;radix&lt;/code&gt; 진수인 문자열 &lt;code&gt;s&lt;/code&gt;를 큰 정수로 변환하여 반환한다.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;toBinaryString(long l)&lt;/code&gt; : 큰 정수 &lt;code&gt;l&lt;/code&gt;를 이진수인 문자열로 반환한다.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;toHexString(long l)&lt;/code&gt; : 큰 정수 &lt;code&gt;l&lt;/code&gt;를 16진수인 문자열로 반환한다.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;toOctalString(long l)&lt;/code&gt; : 큰 정수 &lt;code&gt;l&lt;/code&gt;를 8진수인 문자열로 반환한다.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;toString(long l)&lt;/code&gt; : 큰 정수 &lt;code&gt;l&lt;/code&gt;를 문자열로 반환한다.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 data-ke-size=&quot;size26&quot;&gt;객체 메서드&lt;/h2&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;&lt;code&gt;byteValue()&lt;/code&gt; : 객체가 가진 큰 정수값을 &lt;code&gt;byte&lt;/code&gt;타입으로 반환한다.(&lt;code&gt;long&lt;/code&gt; &amp;gt; &lt;code&gt;byte&lt;/code&gt; 강제 형변환)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;doubleValue()&lt;/code&gt; : 객체가 가진 큰 정수값을 &lt;code&gt;double&lt;/code&gt;타입으로 반환한다.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;equals(Object o)&lt;/code&gt; : 객체에 전달된 &lt;code&gt;o&lt;/code&gt;와 같은가의 여부를 반환한다.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;floatValue()&lt;/code&gt; : 객체가 가진 큰 정수값을 &lt;code&gt;float&lt;/code&gt;타입으로 반환한다.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;intValue()&lt;/code&gt; : 객체가 가진 큰 정수값을 &lt;code&gt;int&lt;/code&gt;타입으로 반환한다.(&lt;code&gt;long&lt;/code&gt; &amp;gt; &lt;code&gt;int&lt;/code&gt; 강제 형변환)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;longValue()&lt;/code&gt; : 객체가 가진 큰 정수값을 &lt;code&gt;long&lt;/code&gt;타입으로 반환한다.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;shortValue()&lt;/code&gt; : 객체가 가진 큰 정수값을 &lt;code&gt;short&lt;/code&gt;타입으로 반환한다.(&lt;code&gt;long&lt;/code&gt; &amp;gt; &lt;code&gt;short&lt;/code&gt; 강제 형변환)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;toString()&lt;/code&gt; : 객체가 가진 큰 정수값을 문자열로 반환한다.&lt;/li&gt;
&lt;/ul&gt;</description>
      <category>JAVA/클래스&amp;amp;인터페이스</category>
      <author>katia</author>
      <guid isPermaLink="true">https://katiasoft.tistory.com/85</guid>
      <comments>https://katiasoft.tistory.com/85#entry85comment</comments>
      <pubDate>Mon, 10 Apr 2023 20:11:26 +0900</pubDate>
    </item>
    <item>
      <title>[Java] Integer 클래스</title>
      <link>https://katiasoft.tistory.com/84</link>
      <description>&lt;h1&gt;Integer 클래스&lt;/h1&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;&lt;code&gt;Integer&lt;/code&gt;(&lt;code&gt;java.lang.Integer&lt;/code&gt;) 클래스는 정수와 관련된 편의 기능을 제공할 뿐만아니라, 해당 타입 자체가 (&lt;code&gt;int&lt;/code&gt;처럼) 정수 리터럴로 작동할 수 있다.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Integer&lt;/code&gt;는 참조 타입입에 유의한다.(&lt;code&gt;null&lt;/code&gt;을 가질 수 있음)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 data-ke-size=&quot;size26&quot;&gt;정적 멤버 변수&lt;/h2&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;(중요)&lt;code&gt;MAX_VALUE&lt;/code&gt; : &lt;code&gt;int&lt;/code&gt;타입이 가질 수 있는 최댓값이다.&lt;/li&gt;
&lt;li&gt;(중요)&lt;code&gt;MIN_VALUE&lt;/code&gt; : &lt;code&gt;int&lt;/code&gt;타입이 가질 수 있는 최솟값이다.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 data-ke-size=&quot;size26&quot;&gt;정적 메서드&lt;/h2&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;(중요)&lt;code&gt;parseInt(String s)&lt;/code&gt; : 문자열 &lt;code&gt;s&lt;/code&gt;를 정수로 변환하여 반환한다.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;parseInt(String s, int radix)&lt;/code&gt; : &lt;code&gt;radix&lt;/code&gt; 진수인 문자열 &lt;code&gt;s&lt;/code&gt;를 정수로 변환하여 반환한다.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;toBinaryString(int i)&lt;/code&gt; : 정수 &lt;code&gt;i&lt;/code&gt;를 이진수인 문자열로 반환한다.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;toHexString(int i)&lt;/code&gt; : 정수 &lt;code&gt;i&lt;/code&gt;를 16진수인 문자열로 반환한다.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;toOctalString(int i)&lt;/code&gt; : 정수 &lt;code&gt;i&lt;/code&gt;를 8진수인 문자열로 반환한다.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;toString(int i)&lt;/code&gt; : 정수 &lt;code&gt;i&lt;/code&gt;를 문자열로 반환한다.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 data-ke-size=&quot;size26&quot;&gt;객체 메서드&lt;/h2&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;&lt;code&gt;byteValue()&lt;/code&gt; : 객체가 가진 정수값을 &lt;code&gt;byte&lt;/code&gt;타입으로 반환한다.(&lt;code&gt;int&lt;/code&gt; &amp;gt; &lt;code&gt;byte&lt;/code&gt; 강제 형변환)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;doubleValue()&lt;/code&gt; : 객체가 가진 정수값을 &lt;code&gt;double&lt;/code&gt;타입으로 반환한다.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;equals(Object o)&lt;/code&gt; : 객체에 전달된 &lt;code&gt;o&lt;/code&gt;와 같은가의 여부를 반환한다.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;floatValue()&lt;/code&gt; : 객체가 가진 정수값을 &lt;code&gt;float&lt;/code&gt;타입으로 반환한다.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;intValue()&lt;/code&gt; : 객체가 가진 정수값을 &lt;code&gt;int&lt;/code&gt;타입으로 반환한다.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;longValue()&lt;/code&gt; : 객체가 가진 정수값을 &lt;code&gt;long&lt;/code&gt;타입으로 반환한다.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;shortValue()&lt;/code&gt; : 객체가 가진 정수값을 &lt;code&gt;short&lt;/code&gt;타입으로 반환한다.(&lt;code&gt;int&lt;/code&gt; &amp;gt; &lt;code&gt;short&lt;/code&gt; 강제 형변환)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;toString()&lt;/code&gt; : 객체가 가진 정수값을 문자열로 반환한다.&lt;/li&gt;
&lt;/ul&gt;</description>
      <category>JAVA/클래스&amp;amp;인터페이스</category>
      <author>katia</author>
      <guid isPermaLink="true">https://katiasoft.tistory.com/84</guid>
      <comments>https://katiasoft.tistory.com/84#entry84comment</comments>
      <pubDate>Mon, 10 Apr 2023 20:10:19 +0900</pubDate>
    </item>
    <item>
      <title>[Java] Math 클래스</title>
      <link>https://katiasoft.tistory.com/83</link>
      <description>&lt;h1&gt;Math 클래스&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Math&lt;/code&gt; (&lt;code&gt;java.lang.Math&lt;/code&gt;)클래스는 수학과 관련된 편의 기능을 제공한다.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;정적 속성&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;E&lt;/code&gt; : e(자연상수)이다.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PI&lt;/code&gt; : pi(원주율)이다.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;정적 메서드&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;(중요)&lt;code&gt;abs(int|long|float|byte : x)&lt;/code&gt; : &lt;code&gt;x&lt;/code&gt;의 절댓값을 반환한다.&lt;/li&gt;
&lt;li&gt;(중요)&lt;code&gt;addExact(int|long a, int|long b)&lt;/code&gt; : &lt;code&gt;a&lt;/code&gt;와 &lt;code&gt;b&lt;/code&gt;의 합을 반환한다. 단, 오버플로우(언더 플로우)가 발생할 경우 예외(&lt;code&gt;java.lang.ArithmeticException&lt;/code&gt;)를 발생 시킨다.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cbrt(double x)&lt;/code&gt; : &lt;code&gt;x&lt;/code&gt;의 세제곱근을 반환한다.&lt;/li&gt;
&lt;li&gt;(중요)&lt;code&gt;ceil(double x)&lt;/code&gt; : &lt;code&gt;x&lt;/code&gt;를 올림하여 반환한다.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;decrementExact(int|long x)&lt;/code&gt; : &lt;code&gt;x&lt;/code&gt;에 &lt;code&gt;1&lt;/code&gt;을 뺀 값을 반환한다. 단, 오버플로우(언더 플로우)가 발생할 경우 예외(&lt;code&gt;java.lang.ArithmeticException&lt;/code&gt;)를 발생 시킨다.&lt;/li&gt;
&lt;li&gt;(중요)&lt;code&gt;floor(double x)&lt;/code&gt; : &lt;code&gt;x&lt;/code&gt;를 내림하여 반환한다.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;incrementExact(int|long x)&lt;/code&gt; : &lt;code&gt;x&lt;/code&gt;에 &lt;code&gt;1&lt;/code&gt;을 더한 값을 반환한다. 단, 오버플로우(언더 플로우)가 발생할 경우 예외(&lt;code&gt;java.lang.ArithmeticException&lt;/code&gt;)를 발생 시킨다.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;log(double x)&lt;/code&gt; : 자연로그 &lt;code&gt;x&lt;/code&gt;를 반환한다.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;log10(double x)&lt;/code&gt; : 상용로그 &lt;code&gt;x&lt;/code&gt;를 반환한다.&lt;/li&gt;
&lt;li&gt;(중요)&lt;code&gt;max(int|long|float|double a, int|long|float|double b)&lt;/code&gt; : &lt;code&gt;a&lt;/code&gt; 와 &lt;code&gt;b&lt;/code&gt;중 더 큰 수를 반환한다.&lt;/li&gt;
&lt;li&gt;(중요)&lt;code&gt;min(int|long|float|double a, int|long|float|double b)&lt;/code&gt; : &lt;code&gt;a&lt;/code&gt; 와 &lt;code&gt;b&lt;/code&gt;중 더 작은 수를 반환한다.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;multiplyExact(int|long a, int|long b)&lt;/code&gt; : &lt;code&gt;a&lt;/code&gt; 와 &lt;code&gt;b&lt;/code&gt; 의 곱을 반환한다. 단, 오버플로우(언더 플로우)가 발생할 경우 예외(&lt;code&gt;java.lang.ArithmeticException&lt;/code&gt;)를 발생 시킨다.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;negateExact(int|long x)&lt;/code&gt; : &lt;code&gt;x&lt;/code&gt;를 부정하여 반환한다. 단, 오버플로우가 발생할 경우 예외(&lt;code&gt;java.lang.ArithmeticException&lt;/code&gt;)를 발생 시킨다.&lt;/li&gt;
&lt;li&gt;(중요)&lt;code&gt;pow(double a, double b)&lt;/code&gt; : &lt;code&gt;a&lt;/code&gt;의 &lt;code&gt;b&lt;/code&gt;승을 반환한다.&lt;/li&gt;
&lt;li&gt;(중요)&lt;code&gt;random()&lt;/code&gt; : &lt;code&gt;0&lt;/code&gt;이상 &lt;code&gt;1&lt;/code&gt;미만의 랜덤한 실수를 반환한다.&lt;/li&gt;
&lt;li&gt;(중요)&lt;code&gt;sqrt(double x)&lt;/code&gt; : &lt;code&gt;x&lt;/code&gt;의 제곱근을 반환한다.&lt;/li&gt;
&lt;li&gt;(중요)&lt;code&gt;subtractExact(int|long a, int|long b)&lt;/code&gt; : &lt;code&gt;a&lt;/code&gt;에서 &lt;code&gt;b&lt;/code&gt;를 뺀 값을 반환한다. 단, 오버플로우(언더 플로우)가 발생할 경우 예외(&lt;code&gt;java.lang.ArithmeticException&lt;/code&gt;)를 발생 시킨다.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;toIntExact(long x)&lt;/code&gt; : 큰 정수(&lt;code&gt;long&lt;/code&gt;)인 &lt;code&gt;x&lt;/code&gt;를 일반 정수(&lt;code&gt;int&lt;/code&gt;)로 변환하여 반환한다. 단, 오버플로우(언더 플로우)가 발생할 경우 예외(&lt;code&gt;java.lang.ArithmeticException&lt;/code&gt;)를 발생 시킨다.&lt;/li&gt;
&lt;li&gt;생략된 것 : &lt;code&gt;acos&lt;/code&gt;, &lt;code&gt;asin&lt;/code&gt;,&lt;code&gt;atan&lt;/code&gt;, &lt;code&gt;atan2&lt;/code&gt;, &lt;code&gt;cos&lt;/code&gt;, &lt;code&gt;cosh&lt;/code&gt;, &lt;code&gt;exp&lt;/code&gt;, &lt;code&gt;expm1&lt;/code&gt;, &lt;code&gt;floorDiv&lt;/code&gt;, &lt;code&gt;floorMod&lt;/code&gt;, &lt;code&gt;fma&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
      <category>JAVA/클래스&amp;amp;인터페이스</category>
      <author>katia</author>
      <guid isPermaLink="true">https://katiasoft.tistory.com/83</guid>
      <comments>https://katiasoft.tistory.com/83#entry83comment</comments>
      <pubDate>Mon, 10 Apr 2023 20:09:30 +0900</pubDate>
    </item>
    <item>
      <title>[Java] Collection</title>
      <link>https://katiasoft.tistory.com/82</link>
      <description>&lt;h1&gt;Collection Framework&lt;/h1&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;다수의 데이터를 쉽고 효과적으로 처리할 수 있는 표준화된 방법을 제공하는 클래스의 집합이다.&lt;/li&gt;
&lt;li&gt;Collection Framework 는 Java 의 Interface 를 사용하여 구현한다.&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;&amp;nbsp;&lt;/h1&gt;
&lt;h1&gt;Collection Interface&lt;/h1&gt;
&lt;p&gt;&lt;figure class=&quot;imageblock alignLeft&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-origin-width=&quot;546&quot; data-origin-height=&quot;218&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/nxp0P/btr8uulpK3f/n0rcO2aDTlUNHJwYDfpLT1/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/nxp0P/btr8uulpK3f/n0rcO2aDTlUNHJwYDfpLT1/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/nxp0P/btr8uulpK3f/n0rcO2aDTlUNHJwYDfpLT1/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fnxp0P%2Fbtr8uulpK3f%2Fn0rcO2aDTlUNHJwYDfpLT1%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;546&quot; height=&quot;218&quot; data-origin-width=&quot;546&quot; data-origin-height=&quot;218&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;Iterator 인터페이스를 상속한 &lt;code&gt;Collection&lt;/code&gt;은 가장 기본이 되는 인터페이스이다.&lt;/li&gt;
&lt;li&gt;Collection 인터페이스는 &lt;code&gt;List&lt;/code&gt;와 &lt;code&gt;Set&lt;/code&gt;, &lt;code&gt;Queue&lt;/code&gt;인터페이스를 가지고 있다.&lt;/li&gt;
&lt;li&gt;Collection 인터페이스를 사용하는 이유
&lt;ol style=&quot;list-style-type: decimal;&quot; data-ke-list-type=&quot;decimal&quot;&gt;
&lt;li&gt;일관된 API&lt;/li&gt;
&lt;li&gt;프로그래밍 간편화&lt;/li&gt;
&lt;li&gt;프로그램 속도 및 품질 향상&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;아래와 같은 메소드 상속시킨다.&lt;/li&gt;
&lt;/ul&gt;
&lt;table style=&quot;border-collapse: collapse; width: 100%; height: 182px;&quot; border=&quot;1&quot; data-ke-align=&quot;alignLeft&quot; data-ke-style=&quot;style4&quot;&gt;
&lt;tbody&gt;
&lt;tr style=&quot;height: 19px;&quot;&gt;
&lt;td style=&quot;width: 50%; text-align: center; height: 19px;&quot;&gt;&lt;b&gt;메소드&lt;/b&gt;&lt;/td&gt;
&lt;td style=&quot;width: 50%; text-align: center; height: 19px;&quot;&gt;&lt;b&gt;설명&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;height: 19px;&quot;&gt;
&lt;td style=&quot;width: 50%; height: 19px;&quot;&gt;boolean add(E e)&lt;/td&gt;
&lt;td style=&quot;width: 50%; height: 19px;&quot;&gt;해당 Collection에 전달된 요소를 추가한다.(선택적 기능)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;height: 19px;&quot;&gt;
&lt;td style=&quot;width: 50%; height: 19px;&quot;&gt;void clear()&lt;/td&gt;
&lt;td style=&quot;width: 50%; height: 19px;&quot;&gt;&lt;span style=&quot;background-color: #f9f9f9; color: #333333; text-align: start;&quot;&gt;해당 Collection의 모든 요소를 초기화한다.&lt;span style=&quot;background-color: #f9f9f9; color: #333333; text-align: start;&quot;&gt;(선택적 기능)&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;height: 19px;&quot;&gt;
&lt;td style=&quot;width: 50%; height: 19px;&quot;&gt;boolean contains(Object o)&lt;/td&gt;
&lt;td style=&quot;width: 50%; height: 19px;&quot;&gt;&lt;span style=&quot;background-color: #f9f9f9; color: #333333; text-align: start;&quot;&gt;해당 Collection이 전달된 객체를 포함하는 지 여부를 반환한다.&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;height: 19px;&quot;&gt;
&lt;td style=&quot;width: 50%; height: 19px;&quot;&gt;boolean equals(Object o)&lt;/td&gt;
&lt;td style=&quot;width: 50%; height: 19px;&quot;&gt;&lt;span style=&quot;background-color: #f9f9f9; color: #333333; text-align: start;&quot;&gt;해당 Collection과 전달된 객체가 같은 지 여부를 반환한다.&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;height: 17px;&quot;&gt;
&lt;td style=&quot;width: 50%; height: 17px;&quot;&gt;boolean isEmpty()&lt;/td&gt;
&lt;td style=&quot;width: 50%; height: 17px;&quot;&gt;&lt;span style=&quot;background-color: #f9f9f9; color: #333333; text-align: start;&quot;&gt;해당 Collection이 비어있는 지 여부를 반환한다.&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;height: 17px;&quot;&gt;
&lt;td style=&quot;width: 50%; height: 17px;&quot;&gt;Iterator&amp;lt;E&amp;gt; iterator()&lt;/td&gt;
&lt;td style=&quot;width: 50%; height: 17px;&quot;&gt;&lt;span style=&quot;background-color: #f9f9f9; color: #333333; text-align: start;&quot;&gt;해당 Collection의 반복자를 반환한다.&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;height: 17px;&quot;&gt;
&lt;td style=&quot;width: 50%; height: 17px;&quot;&gt;boolean remove(Object o)&lt;/td&gt;
&lt;td style=&quot;width: 50%; height: 17px;&quot;&gt;&lt;span style=&quot;background-color: #f9f9f9; color: #333333; text-align: start;&quot;&gt;해당 Collection에서&amp;nbsp; 전달된 객체를 제거한다.&lt;span style=&quot;background-color: #f9f9f9; color: #333333; text-align: start;&quot;&gt;(선택적 기능)&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;height: 17px;&quot;&gt;
&lt;td style=&quot;width: 50%; height: 17px;&quot;&gt;int size()&lt;/td&gt;
&lt;td style=&quot;width: 50%; height: 17px;&quot;&gt;&lt;span style=&quot;background-color: #f9f9f9; color: #333333; text-align: start;&quot;&gt;해당 Collection의 요소의 총 개수를 반환하다.&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;height: 19px;&quot;&gt;
&lt;td style=&quot;width: 50%; height: 19px;&quot;&gt;Object[] toArray()&lt;/td&gt;
&lt;td style=&quot;width: 50%; height: 19px;&quot;&gt;&lt;span style=&quot;background-color: #f9f9f9; color: #333333; text-align: start;&quot;&gt;해당 Collection의 모든 요소를 Object타입의 배열로 반환한다.&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h1&gt;&amp;nbsp;&lt;/h1&gt;
&lt;h1&gt;Collections 클래스&lt;/h1&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;Collection FraneWork에 속하는 클래스를 지원해주는 정적인 클래스이다.&lt;/li&gt;
&lt;li&gt;사용하기 위해 아래와 같이 선언합니다.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=&quot;css&quot;&gt;&lt;code&gt;import java.util.Collections&lt;/code&gt;&lt;/pre&gt;
&lt;h2 data-ke-size=&quot;size26&quot;&gt;정적 메소드&lt;/h2&gt;
&lt;h3 data-ke-size=&quot;size23&quot;&gt;1. sort(List L)&lt;/h3&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;리스트 &lt;code&gt;L&lt;/code&gt;을 오름차순으로 정렬한다.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=&quot;arduino&quot;&gt;&lt;code&gt;public static void main(String[] args){
    // List의 Class중 ArrayList을 사용하여 코드작성
    ArrayList&amp;lt;Integer&amp;gt; list = new ArrayList&amp;lt;&amp;gt;();

    // 값 입력하기
    for(int i = 0; i &amp;lt; 10; i++){
        list.add(i);            // ArrayList 값 추가
    }

    // sort() 메소드를 이용한 정렬하기
    Collections.sort(list);        // 오름차순 정렬

    System.out.println(list);    // [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]    
}&lt;/code&gt;&lt;/pre&gt;
&lt;h3 data-ke-size=&quot;size23&quot;&gt;2. sort(List L, Collections.reverseOrder())&lt;/h3&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;리스트 &lt;code&gt;L&lt;/code&gt;을 내림차순으로 정렬한다.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=&quot;reasonml&quot;&gt;&lt;code&gt;public static void main(String[] args){
    // List의 Class중 ArrayList을 사용하여 코드작성
    ArrayList&amp;lt;Integer&amp;gt; list = new ArrayList&amp;lt;&amp;gt;();

    // 값 입력하기
    for(int i = 0; i &amp;lt; 10; i++){
        list.add(i);            // ArrayList 값 추가
    }

    // sort() 메소드를 이용한 정렬하기
    Collections.sort(list, Collections.reverseOrder());        // 내림차순 정렬

    System.out.println(list);    // [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]    
}&lt;/code&gt;&lt;/pre&gt;
&lt;h3 data-ke-size=&quot;size23&quot;&gt;3. max(List L), min(List L)&lt;/h3&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;리스트 &lt;code&gt;L&lt;/code&gt;에서 최대/최소 값을 반환한다.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=&quot;arduino&quot;&gt;&lt;code&gt;public static void main(String[] args){
    // List의 Class중 ArrayList을 사용하여 코드작성
    ArrayList&amp;lt;Integer&amp;gt; list = new ArrayList&amp;lt;&amp;gt;();

    // 값 입력하기
    for(int i = 0; i &amp;lt; 10; i++){
        list.add(i);            // ArrayList 값 추가
    }

    System.out.println(Collections.min(list));    // 0
    System.out.println(Collections.max(list));    // 9
}&lt;/code&gt;&lt;/pre&gt;
&lt;h3 data-ke-size=&quot;size23&quot;&gt;4. shuffle(List L)&lt;/h3&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;리스트 &lt;code&gt;L&lt;/code&gt;을 랜덤으로 섞어 준다.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=&quot;arduino&quot;&gt;&lt;code&gt;public static void main(String[] args){
    // List의 Class중 ArrayList을 사용하여 코드작성
    ArrayList&amp;lt;Integer&amp;gt; list = new ArrayList&amp;lt;&amp;gt;();

    // 값 입력하기
    for(int i = 0; i &amp;lt; 10; i++){
        list.add(i);            // ArrayList 값 추가
    }

    // 랜덤으로 섞음
    Collections.shuffle(list);
    System.out.println(list);    // [0, 6, 1, 7, 8, 5, 3, 4, 9, 2]
}&lt;/code&gt;&lt;/pre&gt;
&lt;h3 data-ke-size=&quot;size23&quot;&gt;5. binarySearch(List L, Key)&lt;/h3&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;오름차순으로 정렬된 리스트 &lt;code&gt;L&lt;/code&gt;에서 이진검색을 통해 위치를 반환, 실패시 음수값을 반환한다.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=&quot;reasonml&quot;&gt;&lt;code&gt;public static void main(String[] args){
    // List의 Class중 ArrayList을 사용하여 코드작성
    ArrayList&amp;lt;Integer&amp;gt; list = new ArrayList&amp;lt;&amp;gt;();

    // 값 입력하기
    for(int i = 0; i &amp;lt; 10; i++){
        list.add(i);            // ArrayList 값 추가
    }

    Collections.sort(list);
    System.out.println(Collections.binarySearch(list, 5));    // 5
}&lt;/code&gt;&lt;/pre&gt;
&lt;h3 data-ke-size=&quot;size23&quot;&gt;6. disjoint(List L1, List L2)&lt;/h3&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;두 리스트의 값이 완전히 다른지 검사한다, 하나라도 같은 값이 있으면 &lt;code&gt;False&lt;/code&gt; 반환한다.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=&quot;arduino&quot;&gt;&lt;code&gt;public static void main(String[] args){
    // List의 Class중 ArrayList, Stack을 사용하여 코드작성
    ArrayList&amp;lt;Integer&amp;gt; list = new ArrayList&amp;lt;&amp;gt;();
    Stack&amp;lt;Integer&amp;gt; stack = new Stack&amp;lt;&amp;gt;();

    // 값 입력하기
    for(int i = 0; i &amp;lt; 10; i++){
        list.add(i);    // ArrayList 값 추가
    }

    for (int i = 9; i &amp;gt;= 0; i--) {
        stack.push(i);     // Stack 값 추가
    }

    System.out.println(Collections.disjoint(list, stack));
}&lt;/code&gt;&lt;/pre&gt;</description>
      <category>JAVA/클래스&amp;amp;인터페이스</category>
      <author>katia</author>
      <guid isPermaLink="true">https://katiasoft.tistory.com/82</guid>
      <comments>https://katiasoft.tistory.com/82#entry82comment</comments>
      <pubDate>Thu, 6 Apr 2023 15:37:29 +0900</pubDate>
    </item>
    <item>
      <title>[Java] String 클래스</title>
      <link>https://katiasoft.tistory.com/81</link>
      <description>&lt;h1&gt;String 클래스&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;String(java.lang.String)&lt;/code&gt;클래스는 문자열과 관련된 기능을 제공한다.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;import java.lang.String;&lt;/code&gt;&lt;/pre&gt;&lt;h2&gt;1. 객체 메서드&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;charAt(int i)&lt;/code&gt; : (&lt;code&gt;char&lt;/code&gt;) 문자열이 가지고 있는 문자들 중, &lt;code&gt;i&lt;/code&gt;번째 문자를 반환한다.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;String str1 = &amp;quot;hello&amp;quot;;
System.our.println(str1.charAt(3)); 

// 출력 : l&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;concat(String s)&lt;/code&gt; : (&lt;code&gt;String&lt;/code&gt;) 호출 대상인 문자열의 내용 끝에 &lt;code&gt;s&lt;/code&gt;를 붙인 새로운 문자열을 반환한다.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;String str1 = &amp;quot;hello&amp;quot;;
String str2 = &amp;quot;java!&amp;quot;;
String strCon = str1.concat(str2);
System.out.println(strCon);    

// 출력 : hello java!&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;contains(CharSequence s)&lt;/code&gt; : (&lt;code&gt;boolean&lt;/code&gt;) 호출 대상인 문자열의 내용이 &lt;code&gt;s&lt;/code&gt;를 포함하는가의 여부를 반환한다.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;String str = &amp;quot;hello java!&amp;quot;;
System.out.println(str.contains(&amp;quot;java&amp;quot;)); 

// 출력 : true;&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;endsWith(String s)&lt;/code&gt; : (&lt;code&gt;boolean&lt;/code&gt;) 호출 대상인 문자열의 내용이 &lt;code&gt;s&lt;/code&gt;로 끝나는가의 여부를 반환한다.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;String str = &amp;quot;hello java!&amp;quot;;
System.out.println(str.contains(&amp;quot;java!&amp;quot;)); 

// 출력 : true&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;equals(Object o)&lt;/code&gt; : (&lt;code&gt;boolean&lt;/code&gt;) &lt;code&gt;o&lt;/code&gt;가 &lt;code&gt;Strirng&lt;/code&gt;이 될수 있다면 문자열의 내용을 비교하여 동일한가에 대한 여부를 반환한다.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;String str1 = &amp;quot;java&amp;quot;;
String str2 = &amp;quot;java&amp;quot;;

System.out.println(str1 == str2);    
// 출력 : true -&amp;gt; 하지만 이거는 객체의 주소가 같다는 것을 의미. 
System.out.println(str1.equals(str2));    
// 출력 : true -&amp;gt; 이 메서드를 사용해야 실제 값이 같은지를 비교 할 수 있음.&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;equalsIgnoreCase(String s)&lt;/code&gt; : (&lt;code&gt;boolean&lt;/code&gt;) &lt;code&gt;equals&lt;/code&gt;와 동일하나 대소문자르 가리지 않는다.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;String str1 = &amp;quot;Java&amp;quot;;
String str2 = &amp;quot;java&amp;quot;;

System.out.println(str1.equalsIgnoreCase(str2));    
// 출력 : true&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;indexOf(String s)&lt;/code&gt; : (&lt;code&gt;int&lt;/code&gt;) 호출 대상이 되는 문자열의 내용 중 &lt;code&gt;s&lt;/code&gt;와 일치하는 첫번째 순번을 반환한다. 일치하는 내용이 없다면 &lt;code&gt;-1&lt;/code&gt;을 반환한다.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;String str1 = &amp;quot;Java&amp;quot;;
System.out.println(str1.indexOf(&amp;quot;v&amp;quot;));    
// 출력 : 2
System.out.println(str1.indexOf(&amp;quot;e&amp;quot;));    
// 출력 : -1&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;lastIndexOf(String s)&lt;/code&gt; : (&lt;code&gt;int&lt;/code&gt;) 호출 대상이 되는 문자열의 내용 중 &lt;code&gt;s&lt;/code&gt;와 일치하는 마지막 순번을 반환한다. 일치하는 내용이 없다면 &lt;code&gt;-1&lt;/code&gt;을 반환한다.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;String str1 = &amp;quot;Java&amp;quot;;
System.out.println(str1.lastIndexOf(&amp;quot;a&amp;quot;));    
// 출력 : 3
System.out.println(str1.lastIndexOf(&amp;quot;e&amp;quot;));    
// 출력 : -1&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;length()&lt;/code&gt; : (&lt;code&gt;int&lt;/code&gt;) 문자열의 길이를 반환한다.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;String str1 = &amp;quot;Java&amp;quot;;
System.out.println(str1.length());    
// 출력 : 4&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;matches(String r)&lt;/code&gt; : (&lt;code&gt;boolean&lt;/code&gt;) 호출 대상이 되는 문자열의 내용이 정규식 &lt;code&gt;r&lt;/code&gt;에 부합하는가의 여부를 반환한다.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;String str1 = &amp;quot;Java&amp;quot;;
System.out.println(str1.matches(&amp;quot;[a-z]+&amp;quot;));    
// 출력 : false -&amp;gt; 소문자로만 이루어져 있지 않아서.
System.out.println(str1.matches(&amp;quot;[A-Za-z]+&amp;quot;));    
// 출력 : true&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;repeat(int i)&lt;/code&gt; : (&lt;code&gt;String&lt;/code&gt;) 문자열의 내용을 &lt;code&gt;i&lt;/code&gt;번 반복한 새로운 문자열을 반환한다.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;String str1 = &amp;quot;Java&amp;quot;;
System.out.println(str1.repeat(2));    
// 출력 : JavaJava&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;replace(CharSequence f, CharSequence t)&lt;/code&gt; : (&lt;code&gt;String&lt;/code&gt;) 문자열의 내용에서 &lt;code&gt;f&lt;/code&gt;를 찾아 &lt;code&gt;t&lt;/code&gt;로 치환한 문자열을 반환한다.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;String str1 = &amp;quot;Java&amp;quot;;
System.out.println(str1.replace(&amp;quot;a&amp;quot;, &amp;quot;&amp;quot;));    
// 출력 : Jv&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;replaceAll(String r , String t)&lt;/code&gt; : (&lt;code&gt;String&lt;/code&gt;) 문자열의 내용에서 정규식 &lt;code&gt;r&lt;/code&gt;을 만족하는 내용을 &lt;code&gt;t&lt;/code&gt;로 치환한 문자열을 반환한다.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;String str1 = &amp;quot;Java&amp;quot;;
System.out.println(str1.replaceAll(&amp;quot;[^a-z]&amp;quot;, &amp;quot;&amp;quot;));    
// 출력 : ava&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;split(String r)&lt;/code&gt; : (&lt;code&gt;String[]&lt;/code&gt;) 문자열에서 정규식 &lt;code&gt;r&lt;/code&gt;을 만족하는 내용을 기준으로 문자열을 나누어 문자열 배열로 반환한다.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;String str1 = &amp;quot;hello Java&amp;quot;;
String[] strArr = str1.split(&amp;quot; &amp;quot;); 
// [&amp;quot;hello&amp;quot;, &amp;quot;Java&amp;quot;]&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;startsWith(String s)&lt;/code&gt; : (&lt;code&gt;boolean&lt;/code&gt;) 호출 대상인 문자열의 내용이 &lt;code&gt;s&lt;/code&gt;로 시작하는가의 여부를 반환한다.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;String str1 = &amp;quot;hello Java&amp;quot;;
System.out.println(str1.startsWith(&amp;quot;hello&amp;quot;)); 
// 출력: true&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;strip()&lt;/code&gt; : (&lt;code&gt;String&lt;/code&gt;) 문자열의 내용에서 선/후행하는 연속된 공백을 모두 제거한다.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;String str1 = &amp;quot;   Java   &amp;quot;;
System.out.println(str1.strip()); 
// 출력: Java&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;stripLeading()&lt;/code&gt; : (&lt;code&gt;String&lt;/code&gt;) 문자열의 내용에서 선행하는 연속된 공백을 모두 제거한다.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;String str1 = &amp;quot;   Java   &amp;quot;;
System.out.println(str1.stripLeading()); 
// 출력: &amp;quot;Java   &amp;quot;   &lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;stripTrailing()&lt;/code&gt; : (&lt;code&gt;String&lt;/code&gt;) 문자열의 내용에서 후행하는 연속된 공백을 모두 제거한다.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;String str1 = &amp;quot;   Java   &amp;quot;;
System.out.println(str1.stripLeading()); 
// 출력: &amp;quot;   Java&amp;quot;  &lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;substring(int f, int t)&lt;/code&gt; : (&lt;code&gt;String&lt;/code&gt;) 문자열의 내용에서 &lt;code&gt;f&lt;/code&gt;번째 부터 &lt;code&gt;t-1&lt;/code&gt;번째까지의 문자열을 반환한다.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;String str1 = &amp;quot;Hello Java&amp;quot;;
System.out.println(str1.substring(0,3)); 
// 출력: Hel  &lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;toCharArray()&lt;/code&gt; : (&lt;code&gt;char[]&lt;/code&gt;) 문자열의 내용을 문자 배열로 반환한다.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;String str1 = &amp;quot;Java&amp;quot;;
char[] arrChar = str1.toCharArry();    
// [&amp;#39;J&amp;#39;,&amp;#39;a&amp;#39;,&amp;#39;v&amp;#39;,&amp;#39;a&amp;#39;]&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;toLowerCase()&lt;/code&gt; : (&lt;code&gt;String&lt;/code&gt;) 문자열이 포함하는 모든 알파벳을 소문자로 치환하여 반환한다.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;String str1 = &amp;quot;Java&amp;quot;;
System.out.println(str1.toLowerCase()); 
// 출력: java &lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;toUpperCase()&lt;/code&gt; : (&lt;code&gt;String&lt;/code&gt;) 문자열이 포함하는 모든 알파벳을 대문자로 치환하여 반환한다.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;String str1 = &amp;quot;Java&amp;quot;;
System.out.println(str1.toUpperCase()); 
// 출력: JAVA &lt;/code&gt;&lt;/pre&gt;&lt;h2&gt;2. 정적 메서드&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;copyValueOf(char[] cs)&lt;/code&gt; : (&lt;code&gt;String&lt;/code&gt;) 문자 배열을 문자열로 반환한다.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;Char[] arrChar = new char[] {&amp;#39;j&amp;#39;,&amp;#39;a&amp;#39;,&amp;#39;v&amp;#39;,&amp;#39;a&amp;#39;};
String str = &amp;quot;&amp;quot;;
str = String.copyValueOf(arrChar);
System.out.println(str);    
// 출력: java&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;format(String s, Object ... os)&lt;/code&gt;: (&lt;code&gt;String&lt;/code&gt;) 주어진 규격 &lt;code&gt;s&lt;/code&gt;에 맞도록 하나이상의 값 &lt;code&gt;os&lt;/code&gt;를 대입한 문자열을 반환한다.&lt;ul&gt;
&lt;li&gt;&lt;code&gt;%s&lt;/code&gt; : 문자열 대입&lt;ul&gt;
&lt;li&gt;&lt;code&gt;%xs&lt;/code&gt; : 자리수를 &lt;code&gt;x&lt;/code&gt;자로 맞추어, 선행 공백을 추가하여 대입&lt;/li&gt;
&lt;li&gt;&lt;code&gt;%-xs&lt;/code&gt; : 자리수를 &lt;code&gt;x&lt;/code&gt;자로 맞추어, 후행 공백을 추가하여 대입&lt;/li&gt;
&lt;li&gt;&lt;code&gt;%.ns&lt;/code&gt; : 최대로 출력될 수 있는 문자열의 길이를 &lt;code&gt;n&lt;/code&gt;으로 제한하여 대입&lt;/li&gt;
&lt;li&gt;그 외 &lt;code&gt;%x.ns&lt;/code&gt; 및 &lt;code&gt;-x.ns&lt;/code&gt;등의 형태로 조합하여 사용할 수 있다.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;%d&lt;/code&gt; : 정수형(&lt;code&gt;byte&lt;/code&gt;, &lt;code&gt;short&lt;/code&gt;, &lt;code&gt;int&lt;/code&gt;, &lt;code&gt;long&lt;/code&gt;등) 대입&lt;ul&gt;
&lt;li&gt;&lt;code&gt;%,d&lt;/code&gt; : 천자리를 쉼표로 구분하여 대입한다.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;%xd&lt;/code&gt; : 자리수를 &lt;code&gt;x&lt;/code&gt;자로 맞추어, 선행 공백을 추가하여 대입&lt;/li&gt;
&lt;li&gt;&lt;code&gt;%-xd&lt;/code&gt; : 자리수를 &lt;code&gt;x&lt;/code&gt;자로 맞추어, 후행 공백을 추가하여 대입&lt;/li&gt;
&lt;li&gt;그 외 &lt;code&gt;%,xd&lt;/code&gt;, &lt;code&gt;%,-xd&lt;/code&gt; 등의 형태로 조합하여 사용할 수 있다.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;%f&lt;/code&gt; : 실수형(&lt;code&gt;float&lt;/code&gt;, &lt;code&gt;double&lt;/code&gt; 등) 대입&lt;ul&gt;
&lt;li&gt;&lt;code&gt;%,f&lt;/code&gt; : 천자리를 쉼표로 구분하여 대입한다.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;%.nf&lt;/code&gt; : 소수점을 &lt;code&gt;n&lt;/code&gt;자까지만 표시하고, 나머지에 대해 반올림하여 대입&lt;/li&gt;
&lt;li&gt;&lt;code&gt;%xf&lt;/code&gt; : 자리수를 &lt;code&gt;x&lt;/code&gt;자로 맞추어, 선행 공백을 추가하여 대입(소수점을 위한 마침표(.)도 길이에 포함된다.)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;%-xf&lt;/code&gt; : 자리수를 &lt;code&gt;x&lt;/code&gt;자로 맞추어, 후행 공백을 추가하여 대입(소수점을 위한 마침표(.)도 길이에 포함된다.)&lt;/li&gt;
&lt;li&gt;그 외 &lt;code&gt;%x.nf&lt;/code&gt;, &lt;code&gt;%-x.nf&lt;/code&gt;, &lt;code&gt;%,xf&lt;/code&gt;, &lt;code&gt;,-xf&lt;/code&gt;, &lt;code&gt;%,x.nf&lt;/code&gt; 등의 형태로 조합하여 사용할 수 있다.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;String str = &amp;quot;&amp;quot;;
str = String.format(&amp;quot;%d번은 %s입니다.&amp;quot;, 5, &amp;quot;홍길동&amp;quot;);    
// 출력: 5번은 홀길동입니다.&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;join(CharSequence d, CharSequence... cs)&lt;/code&gt; : (&lt;code&gt;String&lt;/code&gt;) &lt;code&gt;cs&lt;/code&gt;를 &lt;code&gt;d&lt;/code&gt;로 이어 붙힌 문자열을 반환한다.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;String str1 = &amp;quot;Hello&amp;quot;;
String str2 = &amp;quot;Java&amp;quot;;
System.out.println(String.join(str1,str2));    
// 출력: HelloJava&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;valueOf(double d)&lt;/code&gt; : (&lt;code&gt;String&lt;/code&gt;) &lt;code&gt;d&lt;/code&gt;를 문자열로 반환한다.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;String str = &amp;quot;&amp;quot;;
str = String.valueOf(0.3d);
System.out.println(str);    
// 출력: 0.3&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;valueOf(float f)&lt;/code&gt; : (&lt;code&gt;String&lt;/code&gt;) &lt;code&gt;f&lt;/code&gt;를 문자열로 반환한다.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;String str = &amp;quot;&amp;quot;;
str = String.valueOf(5.6f);
System.out.println(str);    
// 출력: 5.6&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;valueOf(int i)&lt;/code&gt; : (&lt;code&gt;String&lt;/code&gt;) &lt;code&gt;i&lt;/code&gt;를 문자열로 반환한다.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;String str = &amp;quot;&amp;quot;;
str = String.valueOf(500);
System.out.println(str);    
// 출력: 500&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;valueOf(long l)&lt;/code&gt; : (&lt;code&gt;String&lt;/code&gt;) &lt;code&gt;l&lt;/code&gt;를 문자열로 반환한다.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;String str = &amp;quot;&amp;quot;;
str = String.valueOf(392L);
System.out.println(str);    
// 출력: 392&lt;/code&gt;&lt;/pre&gt;</description>
      <category>JAVA/클래스&amp;amp;인터페이스</category>
      <author>katia</author>
      <guid isPermaLink="true">https://katiasoft.tistory.com/81</guid>
      <comments>https://katiasoft.tistory.com/81#entry81comment</comments>
      <pubDate>Wed, 5 Apr 2023 14:16:52 +0900</pubDate>
    </item>
    <item>
      <title>[Java] 11. 패키지</title>
      <link>https://katiasoft.tistory.com/80</link>
      <description>&lt;h1&gt;패키지&lt;/h1&gt;
&lt;h2 data-ke-size=&quot;size26&quot;&gt;1. 패키지(Package)&lt;/h2&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;클래스를 모아 놓은 일종의 집합&lt;/li&gt;
&lt;li&gt;유지보수 및 관리를 용이하게 하기 위해서 관련 있는 클래스끼리 묶어서 분리하는 일종의 디렉터리&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 data-ke-size=&quot;size26&quot;&gt;2. Import&lt;/h2&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;다른 패키지에 있는 클래스를 사용하고 싶을 때는 클래스의 이름으로 참조&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=&quot;arduino&quot;&gt;&lt;code&gt;// 패키지안에 A_Class 생성
package packageTest;
public class A_Class{
    public void Print_A(){
        System.out.println(&quot;A-class&quot;);
    }
}&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;arduino&quot;&gt;&lt;code&gt;// 패키지안에 B_Class 생성
package packageTest;
public class B_Class{
    public void Print_B(){
        System.out.println(&quot;B-class&quot;);
    }
}&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;actionscript&quot;&gt;&lt;code&gt;import packageTest.A_Class;
import packageTest.B_Class;

public class Test{
    public static void main(String[] args){
        A_Class a_Class = new A_Class();
        a_Class.Print_A();

        B_Class b_Class = new B_Class();
        b_Class.Print_B();
    }
}&lt;/code&gt;&lt;/pre&gt;
&lt;h2 data-ke-size=&quot;size26&quot;&gt;3. Java에서 지원하는 Package&lt;/h2&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;자바의 기본패키지는 java로 시작하며 확장 패키지는 javax로 시작&lt;/li&gt;
&lt;/ul&gt;
&lt;table style=&quot;border-collapse: collapse; width: 100%; height: 257px;&quot; border=&quot;1&quot; data-ke-align=&quot;alignLeft&quot; data-ke-style=&quot;style4&quot;&gt;
&lt;tbody&gt;
&lt;tr style=&quot;height: 19px;&quot;&gt;
&lt;td style=&quot;width: 50%; text-align: center; height: 19px;&quot;&gt;&lt;b&gt;패키지&lt;/b&gt;&lt;/td&gt;
&lt;td style=&quot;width: 50%; text-align: center; height: 19px;&quot;&gt;&lt;b&gt;설명&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;height: 17px;&quot;&gt;
&lt;td style=&quot;width: 50%; height: 17px;&quot;&gt;java.applet&lt;/td&gt;
&lt;td style=&quot;width: 50%; height: 17px;&quot;&gt;애플릿을 생성하는데 필요한 클래스&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;height: 17px;&quot;&gt;
&lt;td style=&quot;width: 50%; height: 17px;&quot;&gt;java.awt&lt;/td&gt;
&lt;td style=&quot;width: 50%; height: 17px;&quot;&gt;그래픽과 이미지를 위한 클래스&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;height: 17px;&quot;&gt;
&lt;td style=&quot;width: 50%; height: 17px;&quot;&gt;java.beans&lt;/td&gt;
&lt;td style=&quot;width: 50%; height: 17px;&quot;&gt;자바빈즈 구조에 기초한 컴포넌트를 개발하는데 필요한 클래스&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;height: 17px;&quot;&gt;
&lt;td style=&quot;width: 50%; height: 17px;&quot;&gt;java.io&lt;/td&gt;
&lt;td style=&quot;width: 50%; height: 17px;&quot;&gt;입력과 출력 스트림을 위한 클래스&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;height: 17px;&quot;&gt;
&lt;td style=&quot;width: 50%; height: 17px;&quot;&gt;java.lang&lt;/td&gt;
&lt;td style=&quot;width: 50%; height: 17px;&quot;&gt;자바 프로그래밍 언에 필수적인 클래스&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;height: 17px;&quot;&gt;
&lt;td style=&quot;width: 50%; height: 17px;&quot;&gt;java.math&lt;/td&gt;
&lt;td style=&quot;width: 50%; height: 17px;&quot;&gt;수학에 관련된&amp;nbsp; 클래스&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;height: 17px;&quot;&gt;
&lt;td style=&quot;width: 50%; height: 17px;&quot;&gt;java.net&lt;/td&gt;
&lt;td style=&quot;width: 50%; height: 17px;&quot;&gt;네트워킹 클래스&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;height: 17px;&quot;&gt;
&lt;td style=&quot;width: 50%; height: 17px;&quot;&gt;java.nio&lt;/td&gt;
&lt;td style=&quot;width: 50%; height: 17px;&quot;&gt;새로운 네트워킹 클래스&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;height: 17px;&quot;&gt;
&lt;td style=&quot;width: 50%; height: 17px;&quot;&gt;java.xml&lt;/td&gt;
&lt;td style=&quot;width: 50%; height: 17px;&quot;&gt;XML을 지원하는 패키지&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;height: 17px;&quot;&gt;
&lt;td style=&quot;width: 50%; height: 17px;&quot;&gt;java.security&lt;/td&gt;
&lt;td style=&quot;width: 50%; height: 17px;&quot;&gt;보안 프레임 워크를 위한 클래스와 인터페이스&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;height: 17px;&quot;&gt;
&lt;td style=&quot;width: 50%; height: 17px;&quot;&gt;java.sql&lt;/td&gt;
&lt;td style=&quot;width: 50%; height: 17px;&quot;&gt;데이터베이스에 저장된 데이터를 접근하기 위한 클래스&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;height: 17px;&quot;&gt;
&lt;td style=&quot;width: 50%; height: 17px;&quot;&gt;java.util&lt;/td&gt;
&lt;td style=&quot;width: 50%; height: 17px;&quot;&gt;날짜, 난수 생성기 등의 유틸리티 클래스&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;height: 17px;&quot;&gt;
&lt;td style=&quot;width: 50%; height: 17px;&quot;&gt;javax.swing&lt;/td&gt;
&lt;td style=&quot;width: 50%; height: 17px;&quot;&gt;스윙 컴퍼넌트를 위한 클래스&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;height: 17px;&quot;&gt;
&lt;td style=&quot;width: 50%; height: 17px;&quot;&gt;javax.imageio&lt;/td&gt;
&lt;td style=&quot;width: 50%; height: 17px;&quot;&gt;자바 이미지 I/O API&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;</description>
      <category>JAVA/이론</category>
      <author>katia</author>
      <guid isPermaLink="true">https://katiasoft.tistory.com/80</guid>
      <comments>https://katiasoft.tistory.com/80#entry80comment</comments>
      <pubDate>Wed, 29 Mar 2023 20:30:31 +0900</pubDate>
    </item>
  </channel>
</rss>