๐ Premium Read: Access my best content on Medium member-only articles — deep dives into Java, Spring Boot, Microservices, backend architecture, interview preparation, career advice, and industry-standard best practices.
๐ Top 15 Udemy Courses (80-90% Discount): My Udemy Courses - Ramesh Fadatare — All my Udemy courses are real-time and project oriented courses.
▶️ Subscribe to My YouTube Channel (176K+ subscribers): Java Guides on YouTube
▶️ For AI, ChatGPT, Web, Tech, and Generative AI, subscribe to another channel: Ramesh Fadatare on YouTube
import Java Keyword Example
package com.javaguides.teacher;
import com.javaguides.course.Course;
public class Teacher {
List<Course> courses = new ArrayList<>();
public void addCourse(Course course) {
courses.add(course);
}
}
- The fully qualified name of the class can be used. For example:
import com.javaguides.course.Course;
- The package can be imported using the import keyword and the wildcard (*). For example:
import com.javaguides.course.*;
import java.io.File;
import java.net.*;
Java static import
import static java.lang.Math.PI;
// class declaration and other members
public double area() {
return PI * radius * radius;
}
Comments
Post a Comment
Leave Comment