15
nových článků - klikněte pro zobrazení

JavaWorld

Popis:

Solutions for Java developers

URL:

http://www.javaworld.com/

Katalog:

Publikuje:

3 položek/měsíc

Packages and static imports in Java

13.května
In my previous Java 101 tutorial, you learned how to better organize your code by declaring reference types (also known as classes and interfaces) as members of other reference types and blocks. I also showed you how to use nesting to avoid name conflicts between nested reference types and top-level reference types that share the same name. Along with nesting, Java uses packages to resolve same-n…

Static classes and inner classes in Java

20.února
Nested classes are classes that are declared as members of other classes or scopes. Nesting classes is one way to better organize your code. For example, say you have a non-nested class (also known as a top-level class ) that stores objects in a resizable array, followed by an iterator class that returns each object. Rather than pollute the top-level class's namespace, you could declare the itera…

Nesting with Java interfaces

20.února
If you've read my Java 101 tutorial introducing static classes and inner classes , you should be familiar with the basics of working with nested classes in Java code. In this Java tip, you'll learn three common ways to use nesting techniques with Java interfaces. I'll also briefly demonstrate nesting interfaces with static methods, also known as static method interfaces.

Installing Oracle Java SE 11 on Ubuntu 18.04

21.ledna
This article is a quick guide for Ubuntu Linux users installing Java 11, the current long-term support (LTS) Java version. I'll briefly make the case for migrating your code base to Java 11, then guide you through the steps to install Oracle JDK 11 using the Ubuntu command line. Note that this is a quick guide for Ubuntu users installing Java 11. I won't dive too deep into Java 11 features or mig…

Learn how to store data in objects

20.ledna
Last updated: January 2020 Although the snooze button is probably the most commonly used button on an alarm clock, even a simple AlarmClock class needs a few more features. For instance, you might want to control how long the alarm clock will stay in snooze mode. In order to add such a feature, you need to understand how Java controls data. Developers use variables in Java to hold data, with all …

What is the JDK? Introduction to the Java Development Kit

18.ledna
The Java Development Kit (JDK) is one of three core technology packages used in Java programming, along with the JVM (Java Virtual Machine) and the JRE (Java Runtime Environment). It's important to differentiate between these three technologies, as well as understanding how they're connected: The JVM is the Java platform component that executes programs. The JRE is the on-disk part of Java that c…

What is the JRE? Introduction to the Java Runtime Environment

18.ledna
Together, the Java Development Kit (JDK), the Java Virtual Machine (JVM), and the Java Runtime Environment (JRE) form a powerful trifecta of Java platform components for developing and running Java applications. I've previously introduced the JDK and JVM. In this quick tutorial, you'll learn about the JRE, which is the runtime environment for Java. Practically speaking, a runtime environment is a…

What is the JVM? Introducing the Java Virtual Machine

18.ledna
The Java Virtual Machine is a program whose purpose is to execute other programs. It's a simple idea that also stands as one of our greatest examples of coding kung fu . The JVM upset the status quo for its time, and continues to support programming innovation today. What the JVM is used for The JVM has two primary functions: to allow Java programs to run on any device or operating system (known …

Socket programming in Java: A tutorial

10.ledna
This tutorial is an introduction to socket programming Java, starting with a simple client-server example demonstrating the basic features of Java I/O. You'll be introduced to both the original java.io package and NIO, the non-blocking I/O ( java.nio ) APIs introduced in Java 1.4. Finally, you'll see an example that demonstrates Java networking as implemented from Java 7 forward, in NIO.2. Socket…

Inheritance versus composition: How to choose

10.ledna
Inheritance and composition are two programming techniques developers use to establish relationships between classes and objects. Whereas inheritance derives one class from another, composition defines a class as the sum of its parts. Classes and objects created through inheritance are tightly coupled because changing the parent or superclass in an inheritance relationship risks breaking your cod…

Exceptions in Java, Part 2: Advanced features and types

9.ledna
JDK 1.0 introduced a framework of language features and library types for dealing with exceptions , which are divergences from expected program behavior. The first half of this tutorial covered Java's basic exception handling capabilities. This second half introduces more advanced capabilities provided by JDK 1.0 and its successors: JDK 1.4, JDK 7, and JDK 9. Learn how to anticipate and manage ex…

Exceptions in Java, Part 1: Exception handling basics

9.ledna
Java exceptions are library types and language features used to represent and deal with program failure. If you've wanted to understand how failure is represented in source code, you've come to the right place. In addition to an overview of Java exceptions, I'll get you started with Java's language features for throwing objects, trying code that may fail, catching thrown objects, and cleaning up …

Does Java pass by reference or pass by value?

3.ledna
Many programming languages allow passing parameters by reference or by value . In Java, we can only pass parameters by value . This imposes some limits and also raises questions. For instance, if the parameter value is changed in the method, what happens to the value following method execution? You may also wonder how Java manages object values in the memory heap. This Java Challenger helps you r…

Thread behavior in the JVM

23.srpna
Threading refers to the practice of executing programming processes concurrently to improve application performance. While it's not that common to work with threads directly in business applications, they're used all the time in Java frameworks. As an example, frameworks that process a large volume of information, like Spring Batch , use threads to manage data. Manipulating threads or CPU process…

Method overloading in the JVM

23.srpna
Welcome to the new Java Challengers blog! This blog is dedicated to challenging concepts in Java programming. Master them and you will be well on your way to becoming a highly skilled Java programmer. The techniques in this blog take some effort to master, but they’ll make a great difference in your daily experience as a Java developer. Avoiding bugs is easier when you know how to properly apply …
© 2000-2024 ANNECA s.r.o., Klíšská 977/77, 400 01 Ústí nad Labem, Tel: +420 478571021, Email: info@pravednes.cz, Twitter: @pravednes