An Introduction to Real-World Programming with Java
Marc Loy, Patrick Niemeyer, and Daniel Leuck

#Java
#API
📘 این کتاب پرفروش که برای برنامهنویسهای حرفهای و تازهوارد به دنیای جاوا ایدهآله، شما رو با ویژگیهای زبان و ایپیآیهای جاوا 21 آشنا میکنه. نویسندههای کتاب، مارک لوی، پاتریک نیمایر و دن لاک، با استفاده از مثالهای سرگرمکننده، جذاب و واقعی، شما رو با مبانی جاوا شامل کتابخانههای کلاس، تکنیکهای برنامهنویسی و اصطلاحات رایج (Idioms) با نگاهی به ساخت اپلیکیشنهای واقعی آشنا میکنن.
🚀 این ویرایش ششم بهروز شده، محتوا رو گسترش داده تا پوشش مباحث لمبدا و استریمها رو ادامه بده و به شما نشون بده چطوری از پارادایم تابعی در جاوا استفاده کنید. شما درباره جدیدترین ویژگیهای جاوا که از ویرایش پنجم به بعد (از JDK 15 تا 21) اضافه شده، یاد میگیرید. همچنین عمیق میشید توی بحث تردهای مجازی (که با نام Project Loom در جاوا 19 معرفی شد).
💡 این راهنما به شما کمک میکنه:
• ساختار زبان جاوا و اپلیکیشنهای جاوا رو یاد بگیرید.
• برنامههای جاوا رو بنویسید، کامپایل و اجرا کنید.
• مفاهیم پایه تردینگ (Threading) و برنامهنویسی موازی در جاوا رو درک کنید.
• مبانی ورودی و خروجی (I/O) جاوا، شامل فایلهای محلی و منابع شبکه رو یاد بگیرید.
• رابطهای کاربری جذاب با تمرکز روی قابلیت استفاده (Usability) بسازید.
• یاد بگیرید چطور ویژگیهای تابعی با جاوا یکپارچه شدن.
• با عرضه نسخههای جدید، از پیشرفتهای جاوا عقب نمونید.
📑 فهرست مطالب
🌍 این کتاب زبان و محیط برنامهنویسی جاوا رو معرفی میکنه. چه توسعهدهنده نرمافزار باشید و چه کسی که صرفا در زندگی روزمره از اینترنت استفاده میکنه، بدون شک اسم جاوا رو شنیدید. ظهور جاوا یکی از هیجانانگیزترین اتفاقات تاریخ وب بود و اپلیکیشنهای جاوا همچنان موتور محرک کسبوکارهای اینترنتی هستن. جاوا احتمالا محبوبترین زبان برنامهنویسی دنیاست که میلیونها برنامهنویس روی هر مدل کامپیوتری که فکرش رو بکنید ازش استفاده میکنن. جاوا از نظر تقاضای بازار کار، زبانهایی مثل C++ و Visual Basic رو پشت سر گذاشته و به زبان اصلی برای انواع خاصی از توسعه—بهخصوص سرویسهای مبتنی بر وب—تبدیل شده. اکثر دانشگاهها الان از جاوا در دورههای مقدماتی خودشون در کنار بقیه زبانهای مدرن و مهم استفاده میکنن. شاید همین الان دارید از این متن توی یکی از کلاسهاتون استفاده میکنید!
📚 این کتاب به شما پایه و اساس محکمی در مبانی و گرامر جاوا میده. کتاب Learning Java سعی میکنه با ترسیم نقشه زبان جاوا، کتابخانههای کلاس، تکنیکهای برنامهنویسی و اصطلاحات خاص اون، به اسمش وفادار بمونه. ما در بخشهای جذاب عمیق میشیم و حداقل گریزی به بقیه موضوعات محبوب میزنیم. کتابهای دیگه انتشارات اورایلی دقیقاً از جایی که ما تموم میکنیم شروع میشن و اطلاعات جامعتری درباره حوزهها و اپلیکیشنهای خاص جاوا ارائه میدن.
🎮 هر جا که ممکن بوده، مثالهای جذاب، واقعی و سرگرمکننده آوردیم و از صرفاً لیست کردن ویژگیها دوری کردیم. مثالها ساده هستن اما پتانسیل کارهایی که میشه انجام داد رو نشون میدن. ما قرار نیست توی این صفحات "اپلیکیشن فوقالعاده" بعدی رو توسعه بدیم، اما امیدواریم نقطه شروعی برای ساعتها آزمایش و کلنجار رفتن خلاقانه بهتون بدیم که در نهایت منجر بشه خودتون یکی بسازید.
👨💻 چه کسی باید این کتاب را بخواند
این کتاب برای متخصصین کامپیوتر، دانشجوها، افراد فنی و هکرهای فنلاندی نوشته شده! برای هر کسی که نیاز به تجربه عملی کار با جاوا با هدف ساخت اپلیکیشنهای واقعی داره. این کتاب میتونه یک دوره فشرده در برنامهنویسی شیگرا، تردها و رابطهای کاربری هم در نظر گرفته بشه. همونطور که جاوا رو یاد میگیرید، با یک رویکرد قدرتمند و کاربردی برای توسعه نرمافزار هم آشنا میشید که با درک عمیق از مبانی جاوا شروع میشه.
🏗️ در ظاهر، جاوا شبیه C یا C++ به نظر میرسه، بنابراین اگه تجربهای در این زبانها داشته باشید، یک قدم جلوتر هستید. اگر هم ندارید، اصلا نگران نباشید. از خیلی جهات، جاوا شبیه زبانهای داینامیکتری مثل Smalltalk و Lisp عمل میکنه. داشتن دانش از یک زبان شیگرا دیگه حتما کمک میکنه، هرچند شاید مجبور بشید بعضی دیدگاههاتون رو عوض کنید و چند تا عادت رو ترک کنید. جاوا به مراتب سادهتر از زبانهایی مثل C++ و Smalltalk هست. اگه با مثالهای خلاصه و آزمایشهای شخصی خوب یاد میگیرید، این کتاب رو دوست خواهید داشت.
✍️ درباره نویسنده
👨🏫 مارک لوی مهندس نرمافزار ارشد و مدرس فنی هست که در طراحی تجربه کاربری و توسعه فولاستک تخصص داره. اون کار با جاوا رو از سال 1995 به عنوان مدرس در شرکت سان میکروسیستمز شروع کرد و نویسنده چندین کتاب درباره جاوا، تولید رسانه و توسعه میکروکنترلرهاست.
👨💻 پاتریک نیمایر موقع کار در شرکت Southwestern Bell با جاوا درگیر شد. اون مشاور مستقل و نویسنده در حوزههای اپلیکیشنهای غیرمتمرکز و یادگیری ماشین هست. پاتریک خالق BeanShell (یک زبان اسکریپتنویسی جاوا) هست و در پروژههای متنباز زیادی مشارکت داره. اون در حال حاضر در شرکت Orchid Labs در سانفرانسیسکو کار میکنه.
🏢 دن لاک مدیرعامل Ikayzo هست، یک شرکت طراحی اینترکتیو و توسعه نرمافزار در توکیو و هونولولو که مشتریانی مثل سونی، اوراکل و دولت فدرال داره. اون قبلاً معاون تحقیق و توسعه شرکت ValueCommerce در توکیو و مدیر توسعه سایت LastMinute.com در لندن بوده. دانیال تجربه گستردهای در مدیریت تیمهای بیش از 150 نفره در پنج کشور داره. اون در انجمنهای جاوا فعاله، در پروژه BeanShell مشارکت داره و عضو گروههای خبره متعددی در Java Community Process هست.
Ideal for working programmers new to Java, this best-selling book guides you through the language features and APIs of Java 21. Through fun, compelling, and realistic examples, authors Marc Loy, Patrick Niemeyer, and Dan Leuck introduce you to Java's fundamentals, including its class libraries, programming techniques, and idioms, with an eye toward building real applications.
This updated sixth edition expands the content to continue covering lambdas and streams, and shows you how to use a functional paradigm in Java. You'll learn about the latest Java features introduced since the book's fifth edition, from JDK 15 through 21. You'll also take a deep dive into virtual threads (introduced as Project Loom in Java 19).
This guide helps you:
Table of Contents
Chapter 1. A Modern Language
Chapter 2. A First Application
Chapter 3. Tools of the Trade
Chapter 4. The Java Language
Chapter 5. Objects in Java
Chapter 6. Error Handling
Chapter 7. Collections and Generics
Chapter 8. Text and Core Utilities
Chapter 9. Threads
Chapter 10. File Input and Output
Chapter 11. Functional Approaches in Java
Chapter 12. Desktop Applications
Chapter 13. Network Programming in Java
This book introduces the Java programming language and environment. Whether you are a software developer or just someone who uses the internet in your daily life, you’ve undoubtedly heard about Java. Its arrival was one of the most exciting developments in the history of the web, and Java applications continue to power business on the internet. Java is, arguably, the most popular programming language in the world, used by millions of developers on almost every kind of computer imaginable. Java has surpassed languages such as C++ and Visual Basic in terms of developer demand and has become the de facto language for certain kinds of development—especially for web-based services. Most universities are now using Java in their introductory courses alongside the other important modern languages. Perhaps you’re using this text in one of your classes right now!
This book gives you a thorough grounding in Java fundamentals and grammar. Learning Java, Sixth Edition, attempts to live up to its name by mapping out the Java language and its class libraries, programming techniques, and idioms. We’ll dig deep into interesting areas and at least scratch the surface of other popular topics. Other titles from O’Reilly pick up where we leave off and provide more comprehensive information on specific areas and applications of Java.
Whenever possible, we provide compelling, realistic, and fun examples and avoid merely cataloging features. The examples are simple but hint at what can be done. We won’t be developing the next great “killer app” in these pages, but we hope to give you a starting point for many hours of experimentation and inspired tinkering that will lead you to develop one yourself.
Who Should Read This Book
This book is for computer professionals, students, technical people, and Finnish hackers. It’s for everyone who has a need for hands-on experience using Java with an eye toward building real applications. This book could also be considered a crash course in object-oriented programming, threads, and user interfaces. As you learn about Java, you’ll also learn a powerful and practical approach to software development, beginning with a deep understanding of the fundamentals of Java.
Superficially, Java looks like C or C++, so you’ll have a tiny head start in using this book if you have some experience with one of these languages. If you do not, don’t worry. In many respects, Java acts like more dynamic languages such as Smalltalk and Lisp. Knowledge of another object-oriented programming language will certainly help, although you may have to change some ideas and unlearn a few habits. Java is considerably simpler than languages such as C++ and Smalltalk. If you learn well from concise examples and personal experimentation, you’ll like this book.
Marc Loy is a senior software engineer and technical trainer specializing in user experience design and full stack development. He started working with Java in 1995 as a trainer with Sun Microsystems and has authored several books on Java, media production, and microcontroller development.
Patrick Niemeyer became involved with Java while working at Southwestern Bell Technology Resources. He is an independent consultant and author in the areas of decentralized applications and machine learning. Pat is the creator of BeanShell, a Java scripting language, and is a contributor to many open source projects. He currently works for Orchid Labs in San Francisco.
Dan Leuck is the CEO of Ikayzo, a Tokyo and Honolulu-based interactive design and software development firm with customers including Sony, Oracle, Nomura, PIMCO and the federal government. He previously served as Senior Vice President of Research and Development for Tokyo-based ValueCommerce, Asia's largest online marketing company, Global Head of Development for London-based LastMinute.com, Europe's largest B2C website, and President of the US division of DML. Daniel has extensive experience managing teams of 150+ developers in five countries. He has served on numerous advisory boards and panels for companies such as Macromedia and Sun Microsystems. Daniel is active in the Java community, is a contributor to BeanShell, the project lead for SDL, and sits on numerous Java Community Process expert groups.









