Computer Store
store.prestwood.com
-Collapse +Expand
Java
Search Java Group:

Advanced
-Collapse +Expand Java To/From
To/FromCODEGuides
-Collapse +Expand Java Store
PRESTWOODSTORE
   ► KBProgrammingJavaStandard Java   Print This     

Java KB: Standard Java Topic

Topics

29 Articles Found in the Standard Java Topic  (or one of the sub-topics in bold above)

  KB Article    

Stephen Berry
1. Associative Arrays in Java (a Map)

An associative array links a set of keys to a set of values. In Java, associative arrays are implemented as Maps.

This will print "Arizona."

Posted to KB Topic: Language Details
12 years ago

Code
Nothing New Since Your Last Visit
11163
Hits

Java

Mike Prestwood
2. Eclipse IDE for [General] Java Development (Free) If you need support for general Java and Web development, consider Eclipse IDE for Java EE Developers.
12 years ago
(5 Comments , last by Kelly.S2 )

Download
Nothing New Since Your Last Visit
10596
Hits

Java

Evan Egalite
3. Implementing the Composite and Visitor Patterns in Java

Implementing design patterns can be difficult and little sample code exists that walks you through the process. The purpose of this article is to walk through the implementation of a program that uses the Composite and Visitor design patterns. The sample project is written in the object-oriented language, Java, but it could just as easily have been written in C++.

Posted to KB Topic: OOP
18 years ago, and updated 11 years ago
(1 Comments , last by mprestwood )

Article
Nothing New Since Your Last Visit
25987
Hits

Java

Mike Prestwood
4. Is JAVA installed? How do I tell if Java is installed?
12 years ago

FAQ
Nothing New Since Your Last Visit
9391
Hits

Java

Mike Prestwood
5. Java Associative Array (HashMap())

An associative array links a set of keys to a set of values. In Java, associative arrays are implemented as Maps.

This will print "Arizona."

Posted to KB Topic: Language Details
12 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit
29782
Hits

Java

Mike Prestwood
6. Java Base Class (Object)

The Object class is Java's single base class all classes ultimately inherit from.

Posted to KB Topic: OOP
12 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit
5741
Hits

Java

Mike Prestwood
7. Java Class..Object (class..new)

Unlike languages such as C++ and Object Pascal, every line of code written in Java must occur within a class.

Posted to KB Topic: Language Details
12 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit
8403
Hits

Java

Mike Prestwood
8. Java Code Blocks ({ })

Curly braces are used to bracket code blocks including classes and the methods within a class.

For Java, JavaScript, PHP, and C++, I prefer to put the first { at the end of the first line of the code block as in the example above because I see moreJava codeformatted that way.

Posted to KB Topic: Tool Basics
12 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit
5881
Hits

Java

Mike Prestwood
9. Java Comments (// or /* ... */)

Commenting Code
Java uses "//" for a single line comment and /* */ for a multiple line comment.

Posted to KB Topic: Tool Basics
12 years ago, and updated 11 years ago
(16 Comments , last by NewAmerican. )

Code
Nothing New Since Your Last Visit
6749
Hits

Java

Mike Prestwood
10. Java Constructors (Use class name)

A method with the same name as the class.

Posted to KB Topic: OOP
12 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit  
8468
Hits

Java

Mike Prestwood
11. Java Custom Routines

Because java is an OOP language, all custom routines belong to a specific class and are therefore referred to as methods.

All methods in Java must return something so even with procedures, you return a "void".

Posted to KB Topic: Language Details
12 years ago, and updated 12 years ago

Code
Nothing New Since Your Last Visit
6206
Hits

Java

Mike Prestwood
12. Java Deployment Overview

Java applets and applications both require the Java Runtime Environment (JRE) and any additional dependencies you've added.

Posted to KB Topic: Tool Basics
11 years ago

Code
Nothing New Since Your Last Visit
7804
Hits

Java

Mike Prestwood
13. Java Development Tools

Languages Focus: Development Tools

Primary development tool(s) used to develop and debug code.

Java Development Tools

Many compilers and development tools are available. Common development tools include Sun's J2EE, CodeGear JBuilder, and Eclipse.

Posted to KB Topic: Tool Basics
12 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit
5866
Hits

Java

Mike Prestwood
14. Java final class (Final)

In Java, there is the concept of a final class.

Posted to KB Topic: OOP
12 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit
6086
Hits

Java

Mike Prestwood
15. Java finalize (finalize())

Java has a garbage collection algorythm that runs as a background task so it has no destructors. You can use the finalize() method to close additonal resources such as file handles.

Posted to KB Topic: OOP
12 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit
25614
Hits

Java

Mike Prestwood
16. Java If Statement (if..else if..else)

Syntax template:

if (expression) {
  expression1_true_code;
} else if (expression2) {
expression2_true_code;
} else {
  otherwise_code;
}
Posted to KB Topic: Language Basics
11 years ago

Code
Nothing New Since Your Last Visit
6515
Hits

Java

Mike Prestwood
17. Java Inheritance (extends ParentClass)

Simple syntax example of class inheritance.

Posted to KB Topic: Language Details
12 years ago, and updated 11 years ago

Code

KB Post
Nothing New Since Your Last Visit
13021
Hits

Java

Mike Prestwood
18. Java Inheritance-Multiple (Interfaces Only)

Java does not support multiple implementation inheritance. Each class can have only one parent class (a single inheritance path). In Java, you can use multiple interface usage to design in a multiple class way horizontally in a class hierarchy.

Posted to KB Topic: OOP
12 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit
6457
Hits

Java

Mike Prestwood
19. Java Inlining (Automatic)

The Java compiler automatically inlines when it determines  a benefit. The use of final methods is considered a compiler hint to tell the compiler to inline the method if beneficial.

Posted to KB Topic: Language Details
11 years ago

Code
Nothing New Since Your Last Visit
11516
Hits

Java

Mike Prestwood
20. Java Interfaces (Yes)

General Info: Interface

An element of coding where you define a common set of properties and methods for use with the design of two or more classes.

Both interfaces and abstract classes are types of abstraction. With interfaces, like abstract classes, you cannot provide any implementation. However, unlike abstract classes, interfaces are not based on inheritance. You can apply an Interface to any class in your class tree. In a real sense, interfaces are a technique for designing horizontally in a class hierarchy (as opposed to inheritance where you design vertically). Using interfaces in your class design allows your system to evolve without breaking existing code.

Java Interfaces

Posted to KB Topic: OOP
12 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit
7820
Hits

Java

Mike Prestwood
21. Java Literals (quote)

Literals are quoted as in "Prestwood". If you need to embed a quote use a slash in front of the quote as in \".

Posted to KB Topic: Tool Basics
12 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit
10107
Hits

Java

Mike Prestwood
22. Java Logical Operators

Java logical operators:

&& and, as in this and that
|| or, as in this or that
! Not, as in Not This
& boolean logical OR (not short circuited)
| boolean logical OR (not short circuited)
?: Ternary (short for if-then-else)
~ Unary bitwise complement
<< Signed left shift
>> Signed right shift
>>> Unsigned right shift
^ Bitwise exclusiv OR

Posted to KB Topic: Language Basics
11 years ago
(2 Comments , last by Ashwin.k )

Code
Nothing New Since Your Last Visit
11457
Hits

Java

Mike Prestwood
23. Java Member Field

In Java, you can set the scope of a field member to public, protected, or private. Additional modifiers are static, abstract, final (assign only once), strictfp (strict floating point values) transient (do not save to persistent storage), and volatile (all threads see same value).

Posted to KB Topic: OOP
11 years ago

Code
Nothing New Since Your Last Visit
9052
Hits

Java

Mike Prestwood
24. Java Overloading

Java Overloading

  • Operator - No. Sun deliberately choose not include operator overloading in the Java language.
  • Method - Yes.
Posted to KB Topic: Language Details
12 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit
19579
Hits

Java

Mike Prestwood
25. Java Overview and History

Promoted as a single source cross-platform runtime system (Write Once, Run Anywhere). Java builds on and in some ways simplifies the object oriented features of C++. Java applications are typically compiled to byte-code and can run on any platform running the Java Virtual Machine (JVM).

Target Platforms: Java is suitable for creating many types of cross-platform applications that target the JVM including desktop business applications.

Posted to KB Topic: Tool Basics
12 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit
7492
Hits

Java

Mike Prestwood
26. Java Report Tools Overview

Both Eclipse 3.3 and JBuilder 2008 come bundled with Business Intelligence and Reporting Tools (BIRT). BIRT is an Eclipse-based open source reporting system with both a report designer based on Eclipse, and a runtime component that you can add to your app server plus a charting engine that lets you add charts.

Posted to KB Topic: Tool Basics
11 years ago

Code
Nothing New Since Your Last Visit
9621
Hits

Java

Mike Prestwood
27. Java String Concatenation (+ or append)

Java String Concatenation

In Java, you use either the String concatenation + operator or StringBulder class methods such as append. Since Java compilers frequently create intermediate objects when the + operator is used and don't when StringBuilder.append is used, the append method is faster than the + operator.

In general, use the convenience of a + operator when speed is not an issue. For example, when concatenating a small number of items and when code isn't executed very frequently. A decent rule of thumb is to use the + operator for general purpose programming and then optimize the + operator with StringBuilder.append as needed.

Posted to KB Topic: Tool Basics
12 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit
10935
Hits

Java

Mike Prestwood
28. Java Unary Operators

An operation with only one operand (a single input). The Java unary operators are ++, --, +, -, ~, and !.

  • + Indicates positive value (numbers are positive without this)
  • - Negates an expression
  • ++ Increment operator by 1
  • -- Decrement operator by 1
  • ! Logical complement operator (inverts the value of a boolean)
  • ~ Bitwise inversion operator (works on integral data types)
Posted to KB Topic: Tool Basics
12 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit
8511
Hits

Java

Mike Prestwood
29. Java Variables (int x = 0;)

Variable names are case sensitive.

The Java basic types are boolean, byte, short, int, long, float, double, and char. You can also declare a variable to hold a particular instance of a class such as String.

Posted to KB Topic: Tool Basics
12 years ago, and updated 11 years ago

Code
Nothing New Since Your Last Visit
6401
Hits

Java

Icon Legend:
Recent or not:
- Recent activity (within last two weeks).
- No activity last two weeks.
 Since your last logged visit:
- New to you or updated since your last visit (sign in now to activate).
- NOT new to you since your last visit (sign in now to activate).

New Java Knowledge Base Post...

Share your knowledge with the WORLD! In addition to adding comments to existing posts, you can post knowledge you've acquired. We welcome full articles (intro with screen shots), general posts (shorter), and tidbits (tips, FAQs, definitions, etc.).

Post New...

Tidbit Post: Short Flashcard FAQ Definition Quick Tip Code Snippet
Longer Post: Full Article General Post File Link Error News
Other: Blog Topic
Or, if YOU have a question...
  Java Message Board


©1995-2020 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech