본문 바로가기

개발기술/Java

(12)
Java 코딩구현기본 - 클래스,다형성,객체지향 PSVM (String[] args)로 알아보는 메소드`main` 메서드라 한다.다. 자바는 `main(String[] args)` 메서드를 찾아서 프로그램을 시작한다. public:  when your program starts, the Java Virtual Machine (JVM) needs to invoke this method from outside the class that defines it.static: The main method is static because it needs to be invoked by the JVM without creating an instance of the class. main: This is the name of the method that the JVM l..
Java 코딩구현기초 - 연산자/조건반복문/예외처리 예외처리예외 처리(Exception Handling) 는 프로그램 실행 중에 발생할 수 있는 예외적인 상황을 적절하게 처리하기 위한 프로그래밍 기법입니다.  1. 예외 처리 메커니즘throw: 예외를 강제로 발생시키는 키워드입니다. 시스템 오류가 아닌 상황이더라도, 비즈니스로직이나 데이터 상의 오류상황을 강제로 발생시켜 예외를 강제로 생성합니다.throws: 메서드 선언 시 사용하여 해당 메서드 내에서 예외를 직접 처리하지 않고 호출자에게 예외 처리를 위임한다는 의미입니다. 이를 통해 메서드 사용자는 지정된 예외를 반드시 처리해야 합니다.try-catch : 던져진 exception을 해당 scope 내에서 코드로 받아서 처리를 진행함.try-catch-final : try catch 구문과 상관없이 마..
프로그래밍 언어 특징비교분석 Typing SystemPython is dynamically typed, meaning you don’t need to declare the type of variable explicitly; the interpreter infers the type at runtime.Java is statically typed, where you must explicitly declare the type of every variable, making it more strict in terms of type checks before code execution.PerformanceJava is generally faster than Python as Java bytecode is compiled to native mac..
Java 코딩 구현 - 개발환경설정 자바의 특징 : "Programmers Write Once, Run Anywhere(WORA)" 이는, JVM이라는 Java 가상머신 위에서 동작하기 때문에 가능하다. 가상머신이란 프로그램의 실행하기 위해 물리적 머신과 유사한 머신을 소프트웨어로 구현한 것임. JVM의 역할은 자바 애플리케이션을 클래스 로더를 통해 읽어 들여 자바 API와 함께 실행하는 것. JVM은 JAVA와 OS사이에서 중개자 역할을 수행. JAVA가 OS에 구애받지 않고 재사용을 가능하도록 함. 메모리관리, Garbage collection을 수행함. Java의 장점- 간결한 객체지향 언어- Garbage Collection을 통한 메모리 관리- 플랫폼에 종속적이지 않고, 한번 컴파일 된 프로그램은 어느 운영체제나 환경에서 동일하게..