Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7712613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T01:40:32+00:00 2026-06-01T01:40:32+00:00

From what I’ve seen, Android development requires the traditional Java style importing of each

  • 0

From what I’ve seen, Android development requires the traditional Java style importing of each individual class/interface while the suggested templates in XCode import files like Foundation and UIKit. What is the difference in the compiler between Obj-C and Java that makes this sort of big import OK in one, but not OK in the other?

To be clear, I am not whining that this is not available in Java, I am just curious why it would be bad to do something like importing java.util.* or creating some sort of super header file that imports a lot of stuff.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T01:40:34+00:00Added an answer on June 1, 2026 at 1:40 am

    One important thing to note is that the only source code you need to compile any given Java class is the source code of that class.

    Everything else needs to be available in compiled form only (i.e. as .class files). This means that a single .java file is always a syntacitcally closed unit that needs no other source code to make interpretable to a compiler.

    This is quite different to how C-style languages treat external dependencies: they need type and function definitions (as well as macros and some things I probably forgot about right now) in order to be able to correctly parse and compile a .c file (of course some .c files might be syntactically closed, but that’s not the usual case).

    The closest you can get to including a huge .h file in Java is using a .* import to import all classes of a given package: import foo.bar.*, but that’s still miles away from the C/C++/Objective-C way.

    And on a separate note: import foo.* is probably a bit less common in Java than individual imports for a simple reason: Individual imports are much more explicit and make it very clear which classes are used and they are usually written by your IDE of choice anyway, so this choice doesn’t even make Java code harder to write.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

From wikipedia: // A class template to express an equality comparison interface. template<typename T>
From JSP file accessed another JSP file which acts like java class, this used
From a web developer point of view, what changes are expected in the development
From the paper of bigtable. bigtable I read this: Each METADATA row stores approximately
from the app-context.xml: <bean id=userDao class=com.vaannila.dao.UserDAOImpl> <property name=sessionFactory ref=mySessionFactory/> </bean> <bean name=MyServiceT class=com.s.server.ServiceT> <property
from django.db import models class Post(models.Model): title = models.CharField(max_length=100) content = models.CharField(max_length=1000) created =
From my xhtml file: <h:inputTextarea value=#{newPostForm.post.body}> <f:converter converterId=NL2BRConverter /> </h:inputTextarea> From my java file:
From such a job, I'm doing: @OnApplicationStart public class Bootstrap extends Job { Foo
From what I read, the purpose of depmod is to track dependencies for each
From a desktop application developer point of view, is there any difference between developing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.