Tag Archives: Java Virtual Machine

Java Notes-6

interface I { int i = Test.out(“i”, 1); int ii = Test.out(“ii”, 2); }interface J extends I { int j = Test.out(“j”, 3), jj = Test.out(“jj”, 4); }interface K extends J { int k = Test.out(“k”, 5); }class Test { … Continue reading

Posted in Java | Tagged , , , , , , , , , | 1 Comment

Frequently Asked Questions in Java Part-13

Disclaimer: “Sources Unknown”; Compilation only; I compiled it from various sources When I was exploring Java. Question: Java Runtime Environment (JRE): Answer: A subset of the Java Development Kit (JDK) for end-users and developers who want to redistribute the runtime … Continue reading

Posted in Java | Tagged , , , , , , , | 3 Comments

Frequently Asked Questions in Java Part-8

Question: What is Externalizable Interface ? Answer: Externalizable interface is a subclass of Serializable. Java provides Externalizable interface that gives you more control over what is being serialized and it can produce smaller object footprint. ( You can serialize whatever … Continue reading

Posted in Java | Tagged , , , , , , , , , | 2 Comments

Frequently Asked Questions in Java Part-7

Question: What is the difference between notify and notify All methods ? Answer: A call to notify causes at most one thread waiting on the same object to be notified (i.e., the object that calls notify must be the same … Continue reading

Posted in Java | Tagged , , , , , , , | 2 Comments

Frequently Asked Questions in Java Part-6

Question: Which characters may be used as the second character of an identifier, but not as the first character of an identifier? Answer: The digits 0 through 9 may not be used as the first character of an identifier but … Continue reading

Posted in Java | Tagged , , , , , , , , | Leave a comment

Frequently Asked Questions in Java Part-5

Question: There are two classes: A and B. The class B need to inform a class A when some important event has happened. What Java technique would you use to implement it? Answer: If these classes are threads I’d consider … Continue reading

Posted in Java | Tagged , , , , , , , , , , | 1 Comment

Frequently Asked Questions in Java FAQs Part-4

Disclaimer: “Sources Unknown”; Compilation only; I compiled it from various sources When I was exploring Java. Question: What types of values does boolean variables take It only takes values true and false. Which primitive datatypes are signed. Answer: All except … Continue reading

Posted in Java | Tagged , , , , , , , , , , , , , , , | 2 Comments

Java Notes-3

You need a boolean in the if condition. An overriding method only needs to declare that it can throw a subset of the exceptions the overriden method can throw. Having no throws clause in the overriding method is OK. Normal … Continue reading

Posted in Uncategorized | Tagged , , , , , , , | 4 Comments

Java Notes – 1

Disclaimer: “Sources Unknown”; Compilation only; I compiled it from various sources When I was exploring Java. 1. Source file’s elements (in order) Package declaration Import statements Class definitions 2. Importing packages doesn’t recursively import sub-packages. 3. Sub-packages are really different … Continue reading

Posted in Java | Tagged , , , , , , , , , | 16 Comments

Checkstyle~A static code analysis tool

Really big projects require the input of hundreds of programmers, often geographically dispersed and with great differences in skill level. Code reviews are essential to code quality, but no team wants to review tens of thousands of lines of code, … Continue reading

Posted in Java | Tagged , , , , , , , , , , , , , | 5 Comments