/*
import java.util.*;
public class Main{
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int[][] arr=new int [12][11];
for(int i=1;i<=11;i++)
{
for(int j=1;j<=10;j++)
{
arr[i][j]=sc.nextInt();
}
}
for(int j=1;j<=10;j++)
{
if(arr[11][j]==1)
{
for(int i=10;i>=1;i--)
{
if(arr[i][j]>0)
{
System.out.println(j+" "+"crash");
break;
}
else if(arr[i][j]<0)
{
System.out.println(j+" "+"fall");
break;
}
else if(arr[i][j]==0&&i==1)
{
System.out.println(j+" "+"safe");
}
}
}
}
}
}
c 함수 -> java 메소드
*/
/*
import java.util.*;
public class Main{
public static void f() {
System.out.println("hello");
}
public static int mysum(int a, int b) {
return a+b;
}
public static void main(String[] args) {
int a=9, b=7;
System.out.println(mysum(a,b));
}
}
*/
/*
import java.util.*;
public class Main{
public static void f(int a)
{
if(a==1)
{
System.out.print("hello");
}
else if(a==2)
{
System.out.print("world");
}
}
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int a;
a=sc.nextInt();
f(a);
}
}
*/
/*
import java.util.*;
public class Main{
public static int grade(int a)
{
if(90<=a&&a<=100) return 'A';
else if(80<=a&&a<90) return 'B';
else if(70<=a&&a<80) return 'C';
else if(60<=a&&a<70) return 'D';
else return 'F';
}
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int a=sc.nextInt();
System.out.print((char)(grade(a)));
}
}
import java.util.*;
public class Main{
public static int gcd(int c,int d)
{
if(c>=d)
{
for(int i=d;i>=1;i--)
{
if(c%i==0&&d%i==0) {
return i;
}
}
}
else
{
for(int i=c;i>=1;i--)
{
if(c%i==0&&d%i==0) {
return i;
}
}
}
return 1;
}
public static void main(String[] args)
{
Scanner sc=new Scanner(System.in);
int a=sc.nextInt(),b=sc.nextInt();
System.out.print(gcd(a,b));
}
}
import java.util.*;
public class Main {
static int[] arr = new int[1001];
public static int maxi(int a, int b) {
int e = a;
for (int i = a; i <= b; i++) {
if (arr[e] < arr[i]) {
e = i;
}
}
return e;
}
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a, b, n = sc.nextInt();
for (int i = 1; i <= n; i++) {
arr[i] = sc.nextInt();
}
a = sc.nextInt();
b = sc.nextInt();
System.out.print(maxi(a, b));
}
}
import java.util.*;
public class Main{
static int[] arr=new int[1001];
private static Scanner sc;
static int n;
public static int upper_bound(int k)
{
for(int i=1;i<=n;i++)
{
if(arr[i]>k)
{
return i;
}
}
return n+1;
}
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
n=sc.nextInt();
for(int i=1;i<=n;i++)
{
arr[i]=sc.nextInt();
}
int k=sc.nextInt();
System.out.print(upper_bound(k));
}
}
클래스 : 틀 ( 붕어빵틀)
객체 : 물체 ( 붕어빵)
클래스 -> 필드(속성), 생성자(초기설정), 메소드(기능,함수)
*/
/*
import java.util.*;
class Person{
//필드
String name;
int age;
//생성자
Person(){
this(10000,"미정");
}
Person(int age){
this.age=age;
}
Person(int age, String name){
this.age=age;
this.name = name;
}
//메소드
void speak() {
System.out.println(name+"은(는) "+age+"살 입니다");
}
}
class Main{
public static void main(String[] args) {
Person p; // 레퍼런스 변수 선언
p = new Person(); //객체 생성
// p.age=10;
// p.name="TOM";
p.speak();
Person a = new Person();
Scanner sc = new Scanner(System.in);
System.out.println("나이를 입력하세요 >>");
a.age = sc.nextInt();
System.out.println("이름을 입력하세요>>");
a.name = sc.next();
a.speak();
}
}
*/
/*
import java.util.*;
class Circle {
int radius;
String name;
public double getArea() {
return 3.14 * radius * radius;
}
}
public class Main {
public static void main(String[] args) {
Circle pizza;
pizza = new Circle();
pizza.radius = 10;
pizza.name = "자바피자";
double area = pizza.getArea();
System.out.println(pizza.name+"의 면적은 "+area);
Circle donut=new Circle();
donut.radius=2;
donut.name="자바도넛";
area = donut.getArea();
System.out.println(donut.name+"의 면적은"+area);
}
}
import java.util.*;
class Rectangle
{
int width;
int height;
public int getArea()
{
return width*height;
}
}
public class Main
{
public static void main(String[] args) {
Rectangle rect=new Rectangle();
Scanner sc=new Scanner(System.in);
System.out.print(">> ");
rect.width=sc.nextInt();
rect.height=sc.nextInt();
System.out.println("사각형의 면적은 "+rect.getArea());
sc.close();
}
}
*
*
*/
/*
import java.util.*;
class Circle {
int redius;
String name;
public Circle() {
redius = 1;
name = "";
}
public Circle(int r, String n) {
redius = r;
name = n;
}
public double getArea() {
return 3.14 * redius * redius;
}
}
public class Main {
public static void main(String[] args) {
Circle pizza = new Circle(10, "자바피자");
double area = pizza.getArea();
System.out.println(pizza.name +"의 면적은" + area);
Circle donut = new Circle();
donut.name = "도넛피자";
area = donut.getArea();
System.out.println(donut.name + "의 면적은" + area);
}
}
*/
/*
import java.util.*;
class Book
{
String title;
String author;
public Book(String t)
{
this(t,"작자 미상");
}
public Book(String t,String a)
{
title=t;
author=a;
}
}
public class Main
{
public static void main(String[] args) {
Book littlePrince=new Book("어린왕자","생텍쥐페리");
Book loveStroy =new Book("춘향전");
System.out.println(littlePrince.title+" "+littlePrince.author);
System.out.println(loveStroy.title+" "+loveStroy.author);
}
}
*/
import java.util.*;
class TV
{
String name;
int year;
int inch;
public TV(String n,int y,int i)
{
name=n;
year=y;
inch=i;
}
public void show()
{
System.out.println(name+"에서 만든 "+year+"년형 "+inch+"인치 TV");
}
}
public class Main
{
public static void main(String[] args) {
TV myTV=new TV("LG",2017,32);
myTV.show();
}
}