<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>ciao-haru.log</title>
        <link>https://velog.io/</link>
        <description>TechNote</description>
        <lastBuildDate>Thu, 31 Dec 2020 04:04:38 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <image>
            <title>ciao-haru.log</title>
            <url>https://images.velog.io/images/ciao-haru/profile/83a9f6ea-82b7-4f56-a476-5f444d963327/social.png</url>
            <link>https://velog.io/</link>
        </image>
        <copyright>Copyright (C) 2019. ciao-haru.log. All rights reserved.</copyright>
        <atom:link href="https://v2.velog.io/rss/ciao-haru" rel="self" type="application/rss+xml"/>
        <item>
            <title><![CDATA[jpa 엔티티 매핑]]></title>
            <link>https://velog.io/@ciao-haru/jpa-%EC%97%94%ED%8B%B0%ED%8B%B0-%EB%A7%A4%ED%95%91</link>
            <guid>https://velog.io/@ciao-haru/jpa-%EC%97%94%ED%8B%B0%ED%8B%B0-%EB%A7%A4%ED%95%91</guid>
            <pubDate>Thu, 31 Dec 2020 04:04:38 GMT</pubDate>
            <description><![CDATA[<h2 id="locker-----member-11-양방향">Locker &lt;---&gt; Member 1:1 양방향</h2>
<h2 id="member------team-n1---양방향">Member &lt;----&gt; Team N:1   양방향</h2>
<pre><code>@Entity
@Getter
@Setter
public class Locker {

    @Id
    @GeneratedValue
    @Column(name=&quot;locker_id&quot;)
    private long id;
    private String name;

    @OneToOne(mappedBy=&quot;locker&quot;)
    private Member member;

    public Locker(String name) {
        this.name= name;
    }

    public void setMember(Member member) 
    {
        if(member.getLocker()!=this)
            member.setLocker(this);

    }


}</code></pre><pre><code>
@Entity
@NoArgsConstructor
@Getter
@Setter

public class Member {
    @Id
    @GeneratedValue

    private long id;
    private String name;

    @ManyToOne
    @JoinColumn(name=&quot;TEAM_ID&quot;)
    private Team team;


    @OneToOne
    @JoinColumn(name=&quot;locker_id&quot;)
    private Locker locker;

    //무한 루프를 막는 로직
    public void setTeam(Team team) 
    {
        //양방향이라 맵핑 되는 부분을 서로 셋팅을 해줘야 하는데 .
        //일단 Member 의 team은 셋팅
         this.team = team;
         //Team에도 Member를 셋팅하기 전에 이미 member가 포함되어있지 않아야만 셋팅 해줄수있다 Team클래스도 마찬가지 
         if(!team.getMembers().contains(this)) 
         {
             team.getMembers().add(this);
         }
    }

    public void setLocker(Locker locker) 
    {
        this.locker= locker;
        if(locker.getMember() == null) 
        {
            locker.setMember(this);
        }
    }

    public Member(String name) {
        this.name= name;
    }
}</code></pre><p>실행 로직</p>
<pre><code>
@Component
@Transactional 
public class JpaRunner implements ApplicationRunner{
    @PersistenceContext
    EntityManager entityManager;
     public void oneToOne() 
    {

        Member member1 = new Member(&quot;member1&quot;);
        Member member2 = new Member(&quot;member2&quot;);
        Member member3 = new Member(&quot;member3&quot;);
        entityManager.persist(member1);
        entityManager.persist(member2);
        entityManager.persist(member3);


        Locker locker1 = new Locker(&quot;locker4&quot;);
        Locker locker2 = new Locker(&quot;locker5&quot;);
        Locker locker3 = new Locker(&quot;locker6&quot;);
        entityManager.persist(locker1);
        entityManager.persist(locker2);
        entityManager.persist(locker3);

        member1.setLocker(locker1);
        member2.setLocker(locker2);
        member3.setLocker(locker3);
    }

    public void ManyToOne() 
    {

    }

    @Override
    public void run(ApplicationArguments args) throws Exception {
        oneToOne();
    }




}
</code></pre><h3 id="참고--김영한님의-jpa-교재">참고 : 김영한님의 jpa 교재</h3>
]]></description>
        </item>
        <item>
            <title><![CDATA[spring boot + jpa+ mysql 연동 하는거 중에 에러]]></title>
            <link>https://velog.io/@ciao-haru/spring-boot-jpa-mysql-%EC%97%B0%EB%8F%99-%ED%95%98%EB%8A%94%EA%B1%B0-%EC%A4%91%EC%97%90-%EC%97%90%EB%9F%AC</link>
            <guid>https://velog.io/@ciao-haru/spring-boot-jpa-mysql-%EC%97%B0%EB%8F%99-%ED%95%98%EB%8A%94%EA%B1%B0-%EC%A4%91%EC%97%90-%EC%97%90%EB%9F%AC</guid>
            <pubDate>Fri, 25 Dec 2020 04:41:59 GMT</pubDate>
            <description><![CDATA[<p>spring boot + jpa+ mysql 연동 하는거 중에 에러 ..</p>
<p>밑에꺼 쓰면 에러나는데 아직 이유는 모르겠음 
#spring.jpa.database-platform=org.hibernate.dialect.MySQL5InnoDBDialect<br>spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5InnoDBDialect</p>
]]></description>
        </item>
        <item>
            <title><![CDATA[해깔리는 JOIN]]></title>
            <link>https://velog.io/@ciao-haru/%ED%95%B4%EA%B9%94%EB%A6%AC%EB%8A%94-JOIN</link>
            <guid>https://velog.io/@ciao-haru/%ED%95%B4%EA%B9%94%EB%A6%AC%EB%8A%94-JOIN</guid>
            <pubDate>Tue, 22 Dec 2020 07:08:03 GMT</pubDate>
        </item>
        <item>
            <title><![CDATA[ORACLE 월별 쿼리]]></title>
            <link>https://velog.io/@ciao-haru/ORACLE-%EC%9B%94%EB%B3%84-%EC%BF%BC%EB%A6%AC</link>
            <guid>https://velog.io/@ciao-haru/ORACLE-%EC%9B%94%EB%B3%84-%EC%BF%BC%EB%A6%AC</guid>
            <pubDate>Thu, 17 Dec 2020 01:19:55 GMT</pubDate>
            <description><![CDATA[<pre><code>SELECT NVL(SUM(DECODE(TO_CHAR(HIREDATE,&#39;MM&#39;),&#39;01&#39;,1)),0)  &quot;01월&quot;
        ,NVL(SUM(DECODE(TO_CHAR(HIREDATE,&#39;MM&#39;),&#39;02&#39;,1)),0)  &quot;02월&quot;
        ,NVL(SUM(DECODE(TO_CHAR(HIREDATE,&#39;MM&#39;),&#39;03&#39;,1)),0)  &quot;03월&quot;
        ,NVL(SUM(DECODE(TO_CHAR(HIREDATE,&#39;MM&#39;),&#39;04&#39;,1)),0)  &quot;04월&quot;
        ,NVL(SUM(DECODE(TO_CHAR(HIREDATE,&#39;MM&#39;),&#39;05&#39;,1)),0)  &quot;05월&quot;
        ,NVL(SUM(DECODE(TO_CHAR(HIREDATE,&#39;MM&#39;),&#39;06&#39;,1)),0)  &quot;06월&quot;
        ,NVL(SUM(DECODE(TO_CHAR(HIREDATE,&#39;MM&#39;),&#39;07&#39;,1)),0)  &quot;07월&quot;
        ,NVL(SUM(DECODE(TO_CHAR(HIREDATE,&#39;MM&#39;),&#39;08&#39;,1)),0)  &quot;08월&quot;
        ,NVL(SUM(DECODE(TO_CHAR(HIREDATE,&#39;MM&#39;),&#39;09&#39;,1)),0)  &quot;09월&quot;
        ,NVL(SUM(DECODE(TO_CHAR(HIREDATE,&#39;MM&#39;),&#39;10&#39;,1)),0)  &quot;10월&quot;
        ,NVL(SUM(DECODE(TO_CHAR(HIREDATE,&#39;MM&#39;),&#39;11&#39;,1)),0)  &quot;11월&quot;
        ,NVL(SUM(DECODE(TO_CHAR(HIREDATE,&#39;MM&#39;),&#39;12&#39;,1)),0)  &quot;12월&quot;
FROM EMP 
</code></pre><blockquote>
<p>통계 쿼리 뽑는 방법 :DECODE가 IF문 역할을 하는데 HIREDATE(채용일?)을 TO_CHAR로 바꿨을떄 
01<del>12로 나오는데 여기서 01끼리 합을 내면 01월의 통계가 된다 .
그렇게 01</del>12월을 만들면 되는데 그게 왜 이렇게 이해가안된건지 ㅡ_ㅡ..</p>
</blockquote>
]]></description>
        </item>
        <item>
            <title><![CDATA[메소드참조]]></title>
            <link>https://velog.io/@ciao-haru/%EB%A9%94%EC%86%8C%EB%93%9C%EC%B0%B8%EC%A1%B0</link>
            <guid>https://velog.io/@ciao-haru/%EB%A9%94%EC%86%8C%EB%93%9C%EC%B0%B8%EC%A1%B0</guid>
            <pubDate>Wed, 16 Dec 2020 08:51:20 GMT</pubDate>
            <description><![CDATA[<pre><code>package examp;

import java.util.ArrayList;
import java.util.List;

public class RevolutionDto {
    List&lt;Dto&gt; list;

    List&lt;Dto&gt; getList() {
        return list;
    }

    void setList(List&lt;Dto&gt; list) {
        this.list = list;
    }

    public RevolutionDto() {
        list = new ArrayList&lt;Dto&gt;();
    }

    public void accumulated(Dto dto) {
        list.add(dto);
    }

    public void combine(RevolutionDto rdto) {
        list.addAll(rdto.getList());
    }

}
</code></pre><pre><code>
package examp;

import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

public class CollectionEx {
    public static void main(String args[]) {
        Dto[] dtoArr = new Dto[10];
        String type=&quot;&quot;;
        for(int i=0;i&lt;10;i++) 
        {
            int a= 1111;
            if(i%2==0) 
            {
                type=&quot;type1&quot;;

            }else 
            {
                type=&quot;type2&quot;;

            }
            dtoArr[i] = new Dto(a*i,String.valueOf(a*i),type);
        }
         System.out.println(&quot;람다&quot;);
         List&lt;Dto&gt; dtoList = Arrays.asList(dtoArr);
         RevolutionDto revolutionDto = dtoList.stream()
                                              .filter(s-&gt;s.getId()%2 == 0)
                                               .collect(
                                                       ()-&gt;new RevolutionDto(),
                                                       (r,t)-&gt;r.accumulated(t),
                                                       (r1,r2) -&gt;r1.combine(r2));
         RevolutionDto revolutionDto1 = dtoList.stream().filter(s-&gt;s.getId()%2 ==0).collect(RevolutionDto::new,RevolutionDto::accumulated,RevolutionDto::combine);     
         System.out.println(revolutionDto);
         System.out.println(revolutionDto1);

     //type으로 group 하기

         Map&lt;?,List&lt;Dto&gt;&gt; dtoGroupingMap =dtoList.stream().collect(Collectors.groupingBy(Dto::getId));
         Map&lt;?,List&lt;Dto&gt;&gt; dtoGroupingMapOrderById =dtoList.stream().collect(Collectors.groupingBy(Dto::getId));
         System.out.println(&quot;dtoGroupingMap:::::&quot;+dtoGroupingMap.toString().toString());  
         System.out.println(&quot;dtoGroupingMapOrderById:::::&quot;+dtoGroupingMapOrderById.toString().toString());  

         //type으로  type1,2 각각의 id의 평균치를 계산 
         Map &lt;String,Double&gt; dtogroupingMapByType =  dtoList.stream().collect(Collectors.groupingBy(Dto::getType,Collectors.averagingDouble(Dto::getId)));
         System.out.println(&quot;dtogroupingMapByType::::::::&quot;+dtogroupingMapByType.toString().toString());


         //type을 키로 하고 나머지 id를 쉼표로 가져오는 방법 
         Map&lt;?,?&gt; dtogroupingMapByTypeCombineSemiCol = dtoList.stream().collect(Collectors.groupingBy(Dto::getType,Collectors.mapping(Dto::getName,Collectors.joining(&quot;,&quot;))));
&gt;          System.out.println(&quot;dtogroupingMapByTypeCombineSemiCol::::::::&quot;+dtogroupingMapByTypeCombineSemiCol.toString().toString());
    }
}
</code></pre>]]></description>
        </item>
        <item>
            <title><![CDATA[stream[storage]]]></title>
            <link>https://velog.io/@ciao-haru/streamstorage</link>
            <guid>https://velog.io/@ciao-haru/streamstorage</guid>
            <pubDate>Wed, 16 Dec 2020 04:20:17 GMT</pubDate>
            <description><![CDATA[<pre><code>import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.IntStream;
import java.util.stream.Stream;

public class StreamStorage {
    public static void main(String args[]) {</code></pre><pre><code>    List&lt;Example&gt; examList = new ArrayList&lt;Example&gt;();
    examList.add(new Example(1, &quot;1111&quot;));
    examList.add(new Example(2, &quot;2111&quot;));
    examList.add(new Example(3, &quot;3111&quot;));
    examList.add(new Example(4, &quot;4111&quot;));

    Stream&lt;Example&gt; streamList = examList.stream();
    streamList.forEach(s -&gt; {
        String name = s.getName();
        int id = s.getId();
        System.out.println(&quot;[name]:::::&quot; + name);
        System.out.println(&quot;[id]:::::&quot; + id);
    });
    // stream은 재사용이 안된다 .따라서 list에서 따로 다시 빼던가 해야됨</code></pre><pre><code>       //double average= streamList.mapToDouble(Example::getId).average().getAsDouble();</code></pre><pre><code>       //System.out.println(&quot;[평균]:&quot;+average);
</code></pre><pre><code>    IntStream intStream = IntStream.range(1, 100);
    int sumOne = intStream.sum();
    System.out.println(&quot;sumOne::::&quot; + sumOne);
    streamList.close();

    Stream&lt;Example&gt; streamList12 = examList.stream();
    int sum = streamList12.filter(s -&gt; &quot;1111&quot;.equals(s.getName())).distinct()
                  .mapToInt(Example::getId).sum();
    System.out.println(sum);

    List&lt;String&gt; nameList = Arrays.asList(&quot;AAA&quot;, &quot;BBB&quot;, &quot;CCC&quot;, &quot;AAA&quot;, &quot;BBB&quot;, &quot;DDD&quot;);
    Stream&lt;String&gt; nameStream = nameList.stream().distinct();
    nameStream.forEach(s -&gt; {
        System.out.println(s);
    });
    nameStream.close();
    Stream&lt;String&gt; nameStream12 = nameList.stream();
    nameStream12.filter(s -&gt; s.startsWith(&quot;A&quot;))
                    .forEach(s -&gt; System.out.println(&quot;startWith:[A]&quot; + s)

    );

    nameList.stream().flatMap(d -&gt; {
        String[] arr = d.split(&quot;,&quot;);
        return Arrays.stream(arr);
    }).forEach(s -&gt; System.out.println(s));

    int[] intArray = { 1, 2, 3, 4, 5 };
    IntStream intStreams = Arrays.stream(intArray);
    intStreams.asDoubleStream().forEach(System.out::println);
    intStreams.close();
    intStreams = Arrays.stream(intArray);
    intStreams.boxed().forEach(System.out::println);
}</code></pre><pre><code>}</code></pre><p><a href="https://ict-nroo.tistory.com/43">https://ict-nroo.tistory.com/43</a> 참조</p>
]]></description>
        </item>
        <item>
            <title><![CDATA[테이블 이름 칼럼 트리형식으로 가져오기 ]]></title>
            <link>https://velog.io/@ciao-haru/%ED%85%8C%EC%9D%B4%EB%B8%94-%EC%9D%B4%EB%A6%84-%EC%B9%BC%EB%9F%BC-%ED%8A%B8%EB%A6%AC%ED%98%95%EC%8B%9D%EC%9C%BC%EB%A1%9C-%EA%B0%80%EC%A0%B8%EC%98%A4%EA%B8%B0</link>
            <guid>https://velog.io/@ciao-haru/%ED%85%8C%EC%9D%B4%EB%B8%94-%EC%9D%B4%EB%A6%84-%EC%B9%BC%EB%9F%BC-%ED%8A%B8%EB%A6%AC%ED%98%95%EC%8B%9D%EC%9C%BC%EB%A1%9C-%EA%B0%80%EC%A0%B8%EC%98%A4%EA%B8%B0</guid>
            <pubDate>Tue, 15 Dec 2020 08:01:51 GMT</pubDate>
            <description><![CDATA[<pre><code> SELECT DECODE(RN,1,TABLE_NAME),TABLE_NAME,COLUMN_NAME,COMMENTS
 FROM (
  SELECT USER_COL_COMMENTS.* , ROW_NUMBER() OVER(PARTITION BY TABLE_NAME ORDER BY ROWNUM ) rn 
  FROM USER_COL_COMMENTS
  WHERE TABLE_NAME LIKE &#39;TABLE_%&#39;;
  )</code></pre>]]></description>
        </item>
        <item>
            <title><![CDATA[내부클래스와 람다식2]]></title>
            <link>https://velog.io/@ciao-haru/%EB%82%B4%EB%B6%80%ED%81%B4%EB%9E%98%EC%8A%A4%EC%99%80-%EB%9E%8C%EB%8B%A4%EC%8B%9D2</link>
            <guid>https://velog.io/@ciao-haru/%EB%82%B4%EB%B6%80%ED%81%B4%EB%9E%98%EC%8A%A4%EC%99%80-%EB%9E%8C%EB%8B%A4%EC%8B%9D2</guid>
            <pubDate>Sat, 12 Dec 2020 04:43:17 GMT</pubDate>
            <description><![CDATA[<pre><code>import java.util.Arrays;
import java.util.List;
import java.util.stream.Stream;

@FunctionalInterface
interface MathInterface {
    int cal(int a, int b);
}

class MathClass implements MathInterface {
    @Override
    public int cal(int a, int b) {
        return a/b;
    }
}
</code></pre><pre><code>public class innerClassExample {

    public static int test(MathInterface mathInterface) {
        return mathInterface.cal(4, 5);
    }

    public static void main(String args[]) {
        MathInterface mathInterface  = new MathClass() 
        {

            @Override
            public int cal(int a, int b) {
                System.out.println(&quot;run implments[Not] lamdaType&quot;);
                return a + b;
            }
        };
        int result = test(mathInterface);
        System.out.println(result);


       MathInterface mathInterface1 = (a,b)-&gt;{return a*b;};    
       int AA = mathInterface1.cal(1, 2);
       System.out.println(&quot;결과값은 &quot;+AA);
    }

}</code></pre>]]></description>
        </item>
        <item>
            <title><![CDATA[내부 클래스와 람다식1]]></title>
            <link>https://velog.io/@ciao-haru/%EB%9E%8C%EB%8B%A4-%EA%B8%B0%EC%B4%88-%EA%B0%9C%EB%85%90</link>
            <guid>https://velog.io/@ciao-haru/%EB%9E%8C%EB%8B%A4-%EA%B8%B0%EC%B4%88-%EA%B0%9C%EB%85%90</guid>
            <pubDate>Fri, 11 Dec 2020 08:40:28 GMT</pubDate>
            <description><![CDATA[<pre><code>package ciao_churu.generic;

import java.util.concurrent.Callable;

interface Testable {
    void run();

}

@SuppressWarnings(&quot;rawtypes&quot;)
class A implements Callable
{

    @Override
    public Object call() throws Exception {
        System.out.println(&quot;CallableStart&quot;);
        return null;
    }
}


public class example {
    public static void test(Runnable test1) {
        test1.run();
    }

    public static &lt;T&gt; T test2(Callable&lt;T&gt; test2) {
        try
        {
            return test2.call();
        } catch (Exception ex) {
            return null;
        }
    }

    @SuppressWarnings(&quot;unchecked&quot;)
    public static void main(String args[]) {

        //1번
        test(()-&gt;{
            System.out.println(&quot;run implments&quot;);
        });

        //2번 
        @SuppressWarnings(&quot;rawtypes&quot;)
        Callable test2Runnable = new A()// A클래스는 Ruunable을 implements한 클래스
        {
            //익명 클래스 부분 
            @Override
            public Object call() 
            {
                System.out.println(&quot;run implments[Not] lamdaType&quot;);
                return null;
            }
        };
        test2(test2Runnable);
    }
}</code></pre><p>참고자료 : <a href="https://nowonbun.tistory.com/499?category=636956">https://nowonbun.tistory.com/499?category=636956</a></p>
]]></description>
        </item>
        <item>
            <title><![CDATA[java 제네릭]]></title>
            <link>https://velog.io/@ciao-haru/java-%EC%A0%9C%EB%84%A4%EB%A6%AD</link>
            <guid>https://velog.io/@ciao-haru/java-%EC%A0%9C%EB%84%A4%EB%A6%AD</guid>
            <pubDate>Thu, 10 Dec 2020 06:58:00 GMT</pubDate>
            <description><![CDATA[<p>틀린 부분 있으면 댓글이나 지적 환영 
<a href="https://namjackson.tistory.com/18">https://namjackson.tistory.com/18</a> 참조 하면서 만들었어요</p>
<blockquote>
<p>그냥 대충 만든 코드 제네릭이 뭔지 알기위한 그런 코드니 참고용으로만 봐주세요</p>
</blockquote>
<p>1 . 제네릭 class </p>
<pre><code>
public class GenericSource&lt;T&gt; {
    private T t;

    public T getT() {
        return t;
    }

    public void setT(T t) {
        this.t = t;
    }

}



public class GenericSource2&lt;T&gt; {

    private int test2;
    private int test3;

    public int getTest2() {
        return test2;
    }

    public void setTest2(int test2) {
        this.test2 = test2;
    }

    public int getTest3() {
        return test3;
    }

    public void setTest3(int test3) {
        this.test3 = test3;
    }

    @Override
    public String toString() {
        return &quot;GenericSource2 [test2=&quot; + test2 + &quot;, test3=&quot; + test3 + &quot;]&quot;;
    }

}</code></pre><ol start="2">
<li>인터페이스의 경우  </li>
</ol>
<pre><code> interface InterFaceExample &lt;T1,T2&gt;{
    T1 testMethod12(T2 t);
    T2 testMethod13(T1 t);
}</code></pre><pre><code>public class TestInterface implements InterFaceExample&lt;String, Integer&gt;{

    @Override
    public String testMethod12(Integer t) {
        return String형태;
    }

    @Override
    public Integer testMethod13(String t) {
        return Integer형태;
    }
} </code></pre><p>3.메소드를 사용할시에 </p>
<h4 id="메소드의-파라미터-t-이-선언되어-있다면-리턴타입-바로앞에-t-제너릭-타입을-선언해주어야한다">//메소드의 파라미터 T 이 선언되어 있다면, 리턴타입 바로앞에 <T> 제너릭 타입을 선언해주어야한다.</h4>
<p>  public class TestGenericMethod {</p>
<pre><code> public static &lt;T&gt; List&lt;T&gt; methodEx(List&lt;T&gt; list,T item)
 {
     list.add(item);
     return list;
 }</code></pre><h4 id="--t를-string-클래스-타입으로-바꿔봐도-ok">--&gt;T를 String 클래스 타입으로 바꿔봐도 OK</h4>
<pre><code> public static &lt;String&gt; List&lt;String&gt; methodEx12(List&lt;String&gt; list,String item)
 {
     list.add(item);
     return list;
 }</code></pre><pre><code> public static &lt;Integer&gt; List&lt;Integer&gt; methodEx12(List&lt;Integer&gt; list,String item)
 {
     list.add(item);
     return list;
 } </code></pre><p>  //parameter에서 <T>형태의 List가 들어가니 리턴도 그걸로 해주겠다라는거 같다</p>
<p>}</p>
<ol start="4">
<li>Main함수나 실행 클래스에서 제네릭 클래스 테스를 해봤다</li>
</ol>
<pre><code>public class GenericMain {
    public static void main(String args[]) {

          GenericSource&lt;Integer&gt; test = new GenericSource&lt;Integer&gt;();
        GenericSource&lt;String&gt; test1 = new GenericSource&lt;String&gt;();
        test.setT(10);


          test.setT(&quot;test123&quot;); error[test에는 문자열이 들어올수없다 위에 이미 선언을 해놔서]

        test.setT(123);// integer으로 했을떄 정상

        test1.setT(123); error[test1 변수는 String 클래스만 들어오게 설정해놔서 int형은 들어올수 없다]
        // String 으로 했을 경우는 정상 
        test1.setT(&quot;test123&quot;); 

        String paramStr = &quot;1&quot;;
        Integer paramint =0;

        List&lt;String&gt; strList = new ArrayList&lt;String&gt;();
        List&lt;Integer&gt; intList = new ArrayList&lt;Integer&gt;();

        TestMethod.methodEx(strList, paramStr);(O);
        TestMethod.methodEx(strList, paramint);(X);
    }
}</code></pre><p>   5.다음으로 WildCard라는게 있다 </p>
<blockquote>
<pre><code>  1. Generic 타입에는 &lt;?&gt;도 존재한다.
  2.?는 알수없는 타입이며, 사용법으로는 아래와같다
  3.&lt;?&gt; : 모든 객체 자료형, 내부적으로는 Object로 인식
  4.&lt;? super 객체형&gt; : 명시된 객체자료형의 상위 객체, 내부적으로는 Object로 인식
5.&lt;? extends 객체자료형&gt; : 명시된 객체자료형을 상속한 하위객체, 내부적으로는 명시된     객체 자료형으로 인식</code></pre></blockquote>
]]></description>
        </item>
    </channel>
</rss>