Changes between Version 3 and Version 4 of JavaProgramming


Ignore:
Timestamp:
Jan 29, 2015, 1:02:42 PM (10 years ago)
Author:
Timothy Lin
Comment:

added ternary operator stuff; added super advanced section; started inheritance section (incomplete); templatized a bit; began section for introduction to computer hardware section (description and link, needs improvement)

Legend:

Unmodified
Added
Removed
Modified
  • JavaProgramming

    v3 v4  
    1111If you have already learned the basics of Java,
    1212    see [#java Advanced Java After Having Already Learned Java Syntax & Control Structures].
     13If you think you are a master in Java and computer science in general,
     14    try [#superjava Incredibly Advanced Java Structures, Techniques, and Design].
     15If you think you are the absolute best programmer in the world,
     16    try again.
    1317
    1418== [=#first_lang]Java as Your First (Programming) Language
    1519
     20=== Introduction to Computer Hardware
     21For those of you starting out in the programming world, a brief description of the hardware of a computational machine is necessary.
     22
     23See [wiki:JavaLanguageArchitecture here] to read about the JVM and how Java compiles.
    1624
    1725== Java as Your Second (Programming) Language
     
    2331== [=#java]Advanced Java After Having Already Learned Java Syntax & Control Structures
    2432
    25 If you have already learned object oriented concepts, skip to the [#advanced_java next section].
     33If you have already learned object oriented concepts, skip to the [#next next section].
    2634
    2735=== Object-Oriented Programming Concepts
     
    3644
    3745==== Inheritance
     46Oftentimes, classes will reuse code from another class and build on it. For example, there might a generic {{{Car}}} class, which several others might ''subclass'' and create additional functionality in their classes, which might be {{{Porsche}}} and {{{Mustang}}}.
    3847
    3948==== Polymorphism
    4049
    41 === Advanced Java Techniques
     50=== [=#next]The Ternary Operator
     51When assigning a value to a variable, sometimes, if the value being assigned is subject to a condition, the ternary operator will simplify code, save space, and enhance comprehension, but only when used properly. The operator transforms this:
    4252
     53{{{
     54#!java
     55int integer;
     56
     57if (newIntegerWanted())
     58  integer = randomInteger();
     59else
     60  integer = 0;
     61}}}
     62
     63to:
     64
     65{{{
     66#!java
     67int integer = newIntegerWanted() ? randomInteger() : 0;
     68}}}
     69
     70=== Abstract Classes
     71==== Choosing between an abstract class, an interface, or standard inheritance
     72
     73== [=#superjava]Super Advanced Java Structures, Techniques, & Design
     74