Skip to Content
For Enterprise
For Government
For Higher Ed
For Individuals
For Marketing
For Enterprise
For Government
For Higher Ed
For Individuals
For Marketing
Explore Skills
Cloud Computing
Microsoft Azure
Amazon Web Services (AWS)
Google Cloud
Cloud Migration
Cloud Deployment
Cloud Platforms
Data Engineering
Data Warehouse
SQL
Apache Spark
Microsoft SQL Server
MySQL
Kafka
Data Lake
Streaming & Messaging
NoSQL Databases
Relational Databases
Data Science
Pandas
R
MATLAB
SAS
D3
Power BI
Tableau
Statistics
Exploratory Data Analysis
Data Visualization
AI & ML
Generative AI
Machine Learning
Artificial Intelligence (AI)
Deep Learning
Reinforcement Learning
Natural Language Processing
TensorFlow
Scikit-Learn
Hyperparameter Tuning
MLOps
Programming Languages
Java
JavaScript
Spring
Python
Go
C#
C++
C
Swift
Rust
Functional Programming
Software Architecture
Object-Oriented
Distributed Systems
Domain-Driven Design
Architectural Patterns
IT/Ops
Kubernetes
Docker
GitHub
Terraform
Continuous Delivery
Continuous Integration
Database Administration
Computer Networking
Operating Systems
IT Certifications
Security
Network Security
Application Security
Incident Response
Zero Trust Model
Disaster Recovery
Penetration Testing / Ethical Hacking
Governance
Malware
Security Architecture
Security Engineering
Security Certifications
Design
Web Design
Graphic Design
Interaction Design
Film & Video
User Experience (UX)
Design Process
Design Tools
Business
Agile
Project Management
Product Management
Marketing
Human Resources
Finance
Team Management
Business Strategy
Digital Transformation
Organizational Leadership
Soft Skills
Professional Communication
Emotional Intelligence
Presentation Skills
Innovation
Critical Thinking
Public Speaking
Collaboration
Personal Productivity
Confidence / Motivation
Features
All features
Verifiable skills
AI Academy
Courses
Certifications
Interactive learning
Live events
Superstreams
Answers
Insights reporting
Radar Blog
Buy Courses
Plans
Sign In
Try Now
O'Reilly Platform
book
자바에서 코틀린으로
by
덩컨 맥그레거
,
냇 프라이스
,
오현석
November 2022
Beginner to intermediate
544 pages
12h 39m
Korean
Hanbit Media, Inc.
Content preview from
자바에서 코틀린으로
52
자바에서 코틀린으로
코틀린을 처음 접한 독자라면
getLocalPart
()
와
getDomain
()
접근자 메서드에 어떤 일이
벌어졌는지 궁금해할 수도 있다.
domain
프로퍼티를 선언하면 코틀린 컴파일러가 비공개
private
domain
필드와
getDomain
()
접근자 메서드를 생성해 준다. 따라서 자바 코드는 여전히 접근
자 메서드를 호출할 수 있다. 다음은 마케팅 계획을 지원하는 경우를 보여 주는 임시 예제 코드다.
예제
3.6
[classes.3:src/main/java/travelator/Marketing.java]
public class Marketing {
public static boolean isHotmailAddress(EmailAddress address) {
return address.getDomain().equalsIgnoreCase(“hotmail.com”);
}
}
자바에서
getDomain
()
메서드를 통해 도메인 프로퍼티를 접근하는 모습을 볼 수 있다. 반대
로 이 클래스가 자바에 정의되어 있고
getDomain
()
이라는 메서드가 명시적으로 들어있다면,
코틀린 코드에서는
address
.
domain
으로 이 메서드에 접근할 수 있다. 프로퍼티는
11
장에서
더 자세히 다룬다.
지금까지 코틀린으로 클래스를 변경함으로써 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial
You might also like
고성능 파이썬(2판)
오현석, 미샤 고렐릭, 이안 오스발트
러닝 타입스크립트
조시 골드버그
실리콘밸리 리더십
김정혜, 마이클 롭
머신러닝 시스템 설계
칩 후옌
Publisher Resources
ISBN: 9791169210447