JAVA BASICS

H

hema

HELLO i am new to java.please help me by clarify these doubts

1)what is COMPILE-TIME TYPE and RUN-TIME TYPE?

2)what are actions that are done in COMPILATIONPROCESS and
in
RUN-TIME PROCESS?

2)please give detailed explanation on MULTITHREADING.

PLEASE GIVE ME INFORMATION ON JAVA RESOURCES ON INTERNET
ESPECIALLY ABOUT MULTITHREADING(it is very confuse me)
 
O

Oliver Wong

hema said:
HELLO i am new to java.please help me by clarify these doubts

1)what is COMPILE-TIME TYPE and RUN-TIME TYPE?

They are terms I'd rather avoid using. Compile-time type probably
refers to the type of a reference, whereas run-time type probably refers
to the type of an object. The concept that an object might be of a
different type than that of the reference pointing to that object is
something a lot of beginners have trouble with, I find. Consider:

Number foo = new Integer(5);

Here, we have a reference "foo" whose type is Number, and it points to
an object whose type is Integer. The type of the reference (Number) is
different from the type of the object (Integer).
2)what are actions that are done in COMPILATIONPROCESS and
in
RUN-TIME PROCESS?

Well... compilation occurs during the "compilation process" and
running-the-program occurs during "run-time process". This is a pretty
open-ended question, and I bet you could fill 4 books with all the
possible things that could be done during compilation and runtime (by
investigating the internals of various compilers and JVMs). I won't bother
going that detailed.
2)please give detailed explanation on MULTITHREADING.

PLEASE GIVE ME INFORMATION ON JAVA RESOURCES ON INTERNET
ESPECIALLY ABOUT MULTITHREADING(it is very confuse me)
See:
http://java.sun.com/docs/books/tutorial/essential/concurrency/

You may also be interested in:
http://www.cs.indiana.edu/docproject/zen/zen-1.0_6.html#SEC56

- Oliver
 
L

Lew

hema said:
HELLO i am new to java.please help me by clarify these doubts

1)what is COMPILE-TIME TYPE and RUN-TIME TYPE?

2)what are actions that are done in COMPILATIONPROCESS and
in
RUN-TIME PROCESS?

2)please give detailed explanation on MULTITHREADING.

PLEASE GIVE ME INFORMATION ON JAVA RESOURCES ON INTERNET
ESPECIALLY ABOUT MULTITHREADING(it is very confuse me)

Please avoid USING ALL CAPITAL LETTERS - it gives the impression of screaming.
The proper use of capital letters is to use an upper-case letter as the first
letter of the first word of a sentence, as the first letter of proper nouns
and as each letter within most acronyms.

1)
Compile-time type is the declared type of a variable, e.g.,

List <String> strings;

At compile time the type is known to be 'List <String>'.

If you assign a particular List to that variable:

strings = new ArrayList <String> ();

then at run time, which is when the assignment happens, the run-time type of
the object is ArrayList<String>, but the variable 'strings' still has its
compile-time type of List<String>.

2)
<http://java.sun.com/docs/books/tutorial/essential/concurrency/>

You should be in the habit of looking to Sun's tutorials as a first source for
most things. After that, GIYF.

-- Lew
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top