Variable Declaration « Class Definition « Java Articles

Java Articles
1. Class Definition
2. Data
3. Development
4. GUI
5. J2EE
6. J2ME
7. JavaBeans
8. Language
9. Microsoft Collabration
10. Network
11. Swing
12. System Resource
13. XML
Microsoft Office Word 2007 Tutorial
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Products
Java by API
C# / C Sharp
C# / CSharp Tutorial
ASP.Net
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
PHP
Python
SQL Server / T-SQL
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Java Articles » Class Definition » Variable Declaration 
1. Customize scoping with object keys
Author:Mark Roulo
URL:http://www.javaworld.com/javaworld/javatips/jw-javatip84.html?
Summary: The standard types of scoping provided by Java -- public, packaged, protected, and private -- are usually all you need. Occasionally, however, standard scoping is insufficient. While C++ permits you to establish a friend relationship between a class and other classes or functions (see the Sidebar, "What is C++ friendship?"), Java does not provide this capability. Mark Roulo presents an approach for building very specific relationships between a class and other functions, classes, and packages in Java. Using this approach, you can grant access to a class's methods with fine-grained control. (1,500 words)


2. Identify subclasses at runtime
Author:Daniel Le Berre
URL:http://www.javaworld.com/javaworld/javatips/jw-javatip113.html?
Summary: Java Reflection provides a lot of information about a given class at runtime; you can easily know all its super classes, implemented interfaces, methods, constructors, fields, and so on. But in some cases, you may want to know all the classes implementing a given interface, or subclassing a given class. This tip, based on lessons learned from Java Tip 105, shows you how to retrieve all the classes from a package inheriting or implementing a given class or interface. (1,200 words)


3. Use nested classes for better organization
Author:Ramnivas Laddad
URL:http://www.javaworld.com/javaworld/javatips/jw-javatip75.html?
Summary: Top-level nested classes (static inner classes) act like top-level classes except they use the enclosing class as a namespace. This tip suggests designing supporting classes as top-level nested classes inside the primary class. This approach makes the coupling between the primary and the supporting classes clear and leads to an implementation that is easier to understand, use, and maintain. (1,100 words)


4. Help with ints
Author:Tony Sintes
URL:http://www.javaworld.com/javaworld/javaqa/2000-11/03-qa-1117-integer.html?
Summary: Which Integer statement works best?


5. Can you create a matrix of primitive types that default to all zeros?
Author:Tony Sintes
URL:http://www.javaworld.com/javaworld/javaqa/2000-11/01-qa-1103-array.html?
Summary: Yes, you can, and here's how


6. In Java, size doesn't matter
Author:Tony Sintes
URL:http://www.javaworld.com/javaworld/javaqa/2000-09/04-qa-0929-size.html?
Summary: Can you ascertain the size of a primitive in Java?


7. Java's primitive wrappers are written in stone
Author:Tony Sintes
URL:http://www.javaworld.com/javaworld/javaqa/2000-06/01-qa-0602-immutable.html?
Summary: You can't alter an immutable object!


8. Valid identifiers
Author:Tony Sintes
URL:http://www.javaworld.com/javaworld/javaqa/2001-12/02-qa-1221-package.html?
Summary: Can a number serve as an identifier in Java?


9. A Boolean wrapped with string
Author:Tony Sintes
URL:http://www.javaworld.com/javaworld/javaqa/2001-11/02-qa-1109-boolean.html?
Summary: What's the best way to convert a Boolean primitive to a string?


10. Double trouble
Author:Tony Sintes
URL:http://www.javaworld.com/javaworld/javaqa/2001-09/02-qa-0921-double.html?
Summary: What's the best way to return doubles without affecting performance?


w__ww__._j__a__v_a___2___s_._c___om_ | Contact Us
Copyright 2003 - 08 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.