Notes...

[0] About import Statements

The MyDoublyLinkedList.java source file contained the statement import java.io.*; but it did not use any classes from the io package. "Coding Standards," which are company/organization/project dependent, would dictate the unused import statement should be deleted.

Note: I think the main() method in the original version of the program got list data from a file, so package io was imported. The main() was changed to use hard-coded list data.

Importing unused packages do not increase memory usage nor do they increase run-time.

Unused packages might be imported in anticipation of them being used in the future.

Coding standards dictate if using the '*' is allowed.

   import java.io.*;   // what classes are being used?

   /* versus */

   // non-* usage provides a form of documentation
   //
   import java.io.InputStream;  
   import java.io.OutputStream;
[1] Potential Final Assessment Exercise

The following code snippet prints A when boolean_exprA evaluates to true. Briefly explain why the code gets interpreted this way.

   String exists = "no";
   
   if (boolean_exprA)
      exists = "yes";

   if (exists == "yes")
      System.out.println("A");
   else
      System.out.println("B");

Record what the following code snippet would print.

   String x = "foo";
   String y = "foo";

   if (x == y)
      System.out.println("C");
   else if (x.equals(y))
      System.out.println("D");
   else
      System.out.println("E");
[2] RankRed.com::NASA's 10 Coding Rules for Writing Safety Critical Program

Creator: Gerald Thurman [gthurman@gmail.com]
Created: 23 April 2017 (updated 08 November 02018)