├── Ch12
├── score.txt
├── .idea
│ ├── description.html
│ ├── encodings.xml
│ ├── vcs.xml
│ ├── modules.xml
│ ├── misc.xml
│ └── compiler.xml
├── out
│ └── production
│ │ └── Ch12
│ │ ├── Main.class
│ │ ├── test.class
│ │ ├── ReadData.class
│ │ ├── WebCrawler.class
│ │ ├── WriteData.class
│ │ ├── ReplaceText.class
│ │ ├── TestFileClass.class
│ │ ├── ReadFileFromURL.class
│ │ ├── ChainedExceptionDemo.class
│ │ ├── InvalidRadiusException.class
│ │ ├── QuotientWithException.class
│ │ ├── CircleWithCustomException.class
│ │ ├── Quiz_12_4_IllArgumentException.class
│ │ ├── TestCircleWithCustomException.class
│ │ ├── Quiz_12_1_NumberFormationException.class
│ │ ├── Quiz_12_3_ArrayIndexOutBoundsException.class
│ │ └── Quiz_12_4_ThrowIllegalArgumentException.class
├── src
│ ├── TestFileClass.java
│ ├── InvalidRadiusException.java
│ ├── Quiz_12_4_IllArgumentException.java
│ ├── ChainedExceptionDemo.java
│ ├── WriteData.java
│ ├── Quiz_12_3_ArrayIndexOutBoundsException.java
│ └── Quiz_12_4_ThrowIllegalArgumentException.java
└── Ch12.iml
├── Ch07
├── src
│ ├── Quz_7_14.java
│ ├── Quiz_7_13.java
│ ├── Quiz_7_7.java
│ ├── InputInteger.java
│ ├── VarArgsDemo.java
│ ├── ArrayCopyMethod.java
│ ├── ReturnArrary.java
│ ├── Quiz_7_34.java
│ ├── Quiz_7_23.java
│ ├── BinarySearch.java
│ ├── Quiz_7_2.java
│ ├── Quiz_7_9.java
│ ├── Quiz_7_3.java
│ ├── Quiz_7_20.java
│ ├── Quiz_7_10.java
│ ├── Quiz_7_12.java
│ ├── Quiz_7_18.java
│ ├── Quiz_7_8.java
│ ├── AnalyzeNum.java
│ └── SelectionSort.java
├── .idea
│ ├── description.html
│ ├── encodings.xml
│ ├── vcs.xml
│ ├── modules.xml
│ ├── misc.xml
│ └── compiler.xml
├── out
│ └── production
│ │ └── Ch07
│ │ ├── Main.class
│ │ ├── Quiz_7_1.class
│ │ ├── Quiz_7_2.class
│ │ ├── Quiz_7_3.class
│ │ ├── Quiz_7_4.class
│ │ ├── Quiz_7_5.class
│ │ ├── Quiz_7_6.class
│ │ ├── Quiz_7_7.class
│ │ ├── Quiz_7_8.class
│ │ ├── Quiz_7_9.class
│ │ ├── Quz_7_14.class
│ │ ├── AnalyzeNum.class
│ │ ├── DeckOfCard.class
│ │ ├── Quiz_7_10.class
│ │ ├── Quiz_7_12.class
│ │ ├── Quiz_7_13.class
│ │ ├── Quiz_7_15.class
│ │ ├── Quiz_7_16.class
│ │ ├── Quiz_7_17.class
│ │ ├── Quiz_7_18.class
│ │ ├── Quiz_7_19.class
│ │ ├── Quiz_7_20.class
│ │ ├── Quiz_7_21.class
│ │ ├── Quiz_7_23.class
│ │ ├── Quiz_7_24.class
│ │ ├── Quiz_7_28.class
│ │ ├── Quiz_7_29.class
│ │ ├── Quiz_7_30.class
│ │ ├── Quiz_7_32.class
│ │ ├── Quiz_7_34.class
│ │ ├── Quiz_7_35.class
│ │ ├── TestArray.class
│ │ ├── BinarySearch.class
│ │ ├── InputInteger.class
│ │ ├── ReturnArrary.class
│ │ ├── SelectionSort.class
│ │ ├── VarArgsDemo.class
│ │ ├── ArrayCopyMethod.class
│ │ └── CountLetterInArray.class
└── Ch07.iml
├── README.md
├── Ch01
├── .idea
│ ├── description.html
│ ├── vcs.xml
│ ├── encodings.xml
│ ├── artifacts
│ │ └── unnamed.xml
│ ├── modules.xml
│ ├── misc.xml
│ └── compiler.xml
├── out
│ └── production
│ │ └── Ch01
│ │ ├── Main.class
│ │ ├── quiz_1_3.class
│ │ ├── quiz_1_6.class
│ │ ├── quiz_1_7.class
│ │ ├── quiz_1_10.class
│ │ ├── quiz_1_11.class
│ │ └── quiz_1_13.class
├── src
│ ├── quiz_1_3.java
│ ├── quiz_1_7.java
│ ├── quiz_1_6.java
│ ├── quiz_1_11.java
│ ├── quiz_1_10.java
│ └── quiz_1_13.java
└── Ch01.iml
├── Ch02
├── .idea
│ ├── description.html
│ ├── encodings.xml
│ ├── vcs.xml
│ ├── modules.xml
│ ├── misc.xml
│ └── compiler.xml
├── out
│ └── production
│ │ └── Ch02
│ │ ├── Main.class
│ │ ├── Quiz_2_6.class
│ │ ├── SalesTax.class
│ │ ├── Quiz_2_13.class
│ │ ├── Quiz_2_17.class
│ │ ├── Quiz_2_23.class
│ │ ├── ComputeChange.class
│ │ ├── ComputeLoan.class
│ │ └── ShowCurrentTime.class
├── Ch02.iml
└── src
│ ├── SalesTax.java
│ ├── Quiz_2_6.java
│ ├── Quiz_2_17.java
│ ├── Quiz_2_23.java
│ ├── Quiz_2_13.java
│ └── Main.java
├── Ch03
├── .idea
│ ├── description.html
│ ├── encodings.xml
│ ├── vcs.xml
│ ├── modules.xml
│ ├── misc.xml
│ └── compiler.xml
├── out
│ └── production
│ │ └── Ch03
│ │ ├── Main.class
│ │ ├── Lottery.class
│ │ ├── Quiz_3_4.class
│ │ ├── Quiz_3_5.class
│ │ ├── Quiz_3_8.class
│ │ ├── Quiz_3_9.class
│ │ ├── ComputeTax.class
│ │ ├── Quiz_3_11.class
│ │ ├── Quiz_3_12.class
│ │ ├── Quiz_3_14.class
│ │ ├── Quiz_3_16.class
│ │ ├── Quiz_3_18.class
│ │ ├── Quiz_3_19.class
│ │ ├── Quiz_3_21.class
│ │ ├── Quiz_3_22.class
│ │ ├── Quiz_3_23.class
│ │ ├── Quiz_3_24.class
│ │ ├── Quiz_3_27.class
│ │ ├── Quiz_3_28.class
│ │ ├── Quiz_3_29.class
│ │ ├── Quiz_3_31.class
│ │ ├── Quiz_3_32.class
│ │ ├── Quiz_3_33.class
│ │ ├── Quiz_3_34.class
│ │ ├── AdditionQuiz.class
│ │ ├── SubtractionQuiz.class
│ │ ├── DoubleEquivalence.class
│ │ └── ComputeAndInterpretBMI.class
├── src
│ ├── DoubleEquivalence.java
│ ├── Quiz_3_14.java
│ ├── Quiz_3_8.java
│ ├── AdditionQuiz.java
│ ├── Quiz_3_23.java
│ ├── Quiz_3_19.java
│ ├── Quiz_3_12.java
│ ├── SubtractionQuiz.java
│ ├── Quiz_3_18.java
│ ├── Quiz_3_22.java
│ ├── Quiz_3_27.java
│ ├── Quiz_3_11.java
│ └── Quiz_3_33.java
└── Ch03.iml
├── Ch04
├── .idea
│ ├── description.html
│ ├── encodings.xml
│ ├── vcs.xml
│ ├── modules.xml
│ ├── misc.xml
│ └── compiler.xml
├── out
│ └── production
│ │ └── Ch04
│ │ ├── Main.class
│ │ ├── Quiz_4_1.class
│ │ ├── Quiz_4_2.class
│ │ ├── Quiz_4_5.class
│ │ ├── Quiz_4_6.class
│ │ ├── Quiz_4_7.class
│ │ ├── Quiz_4_8.class
│ │ ├── Quiz_4_9.class
│ │ ├── FormatDemo.class
│ │ ├── Quiz_4_11.class
│ │ ├── Quiz_4_12.class
│ │ ├── Quiz_4_13.class
│ │ ├── Quiz_4_14.class
│ │ ├── Quiz_4_15.class
│ │ ├── Quiz_4_16.class
│ │ ├── Quiz_4_17.class
│ │ ├── Quiz_4_18.class
│ │ ├── Quiz_4_19.class
│ │ ├── Quiz_4_20.class
│ │ ├── Quiz_4_21.class
│ │ ├── Quiz_4_23.class
│ │ ├── Quiz_4_24.class
│ │ ├── Quiz_4_25.class
│ │ ├── TestPrintf.class
│ │ ├── TestString.class
│ │ ├── HexDigit2Dec.class
│ │ ├── OrderTwoCities.class
│ │ └── LotteryUsingString.class
├── src
│ ├── Quiz_4_16.java
│ ├── TestPrintf.java
│ ├── Quiz_4_20.java
│ ├── Quiz_4_25.java
│ ├── Quiz_4_1.java
│ ├── Quiz_4_8.java
│ ├── Quiz_4_5.java
│ ├── Quiz_4_9.java
│ ├── Quiz_4_11.java
│ ├── FormatDemo.java
│ ├── OrderTwoCities.java
│ └── Quiz_4_7.java
└── Ch04.iml
├── Ch05
├── .idea
│ ├── description.html
│ ├── project-template.xml
│ ├── modules.xml
│ └── misc.xml
├── out
│ └── production
│ │ └── Ch05
│ │ └── com
│ │ └── company
│ │ ├── Cost.class
│ │ ├── Main.class
│ │ ├── Dec2Hex.class
│ │ ├── GuessNum.class
│ │ ├── PrintNum.class
│ │ ├── Quiz_5_8.class
│ │ ├── ChangKG2B.class
│ │ ├── ComputeCost.class
│ │ ├── Palindrome.class
│ │ ├── Quiz_5_10.class
│ │ ├── Quiz_5_14.class
│ │ ├── Quiz_5_15.class
│ │ ├── Quiz_5_16.class
│ │ ├── Quiz_5_17.class
│ │ ├── Quiz_5_18.class
│ │ ├── Quiz_5_19.class
│ │ ├── Quiz_5_20.class
│ │ ├── Quiz_5_21.class
│ │ ├── Quiz_5_23.class
│ │ ├── Quiz_5_24.class
│ │ ├── Quiz_5_25.class
│ │ ├── Quiz_5_26.class
│ │ ├── Quiz_5_27.class
│ │ ├── Quiz_5_28.class
│ │ ├── Quiz_5_29.class
│ │ ├── Quiz_5_30.class
│ │ ├── Quiz_5_32.class
│ │ ├── Quiz_5_33.class
│ │ ├── Quiz_5_35.class
│ │ ├── Quiz_5_37.class
│ │ ├── Quiz_5_38.class
│ │ ├── Quiz_5_39.class
│ │ ├── Quiz_5_40.class
│ │ ├── Quiz_5_41.class
│ │ ├── Quiz_5_43.class
│ │ ├── Quiz_5_44.class
│ │ ├── Quiz_5_46.class
│ │ ├── Quiz_5_47.class
│ │ ├── Quiz_5_48.class
│ │ ├── Quiz_5_49.class
│ │ ├── Quiz_5_50.class
│ │ ├── Quiz_5_51.class
│ │ ├── SentinelVaiue.class
│ │ ├── ComputeAverage.class
│ │ ├── Quiz_5_8_Student.class
│ │ ├── MulitplicationTable.class
│ │ ├── SubtractionQuizLoop.class
│ │ └── GfreatestCommonDivisor.class
├── src
│ └── com
│ │ └── company
│ │ ├── ChangKG2B.java
│ │ ├── Quiz_5_15.java
│ │ ├── Quiz_5_46.java
│ │ ├── Cost.java
│ │ ├── Quiz_5_23.java
│ │ ├── Quiz_5_37.java
│ │ ├── Quiz_5_24.java
│ │ ├── Quiz_5_35.java
│ │ ├── Quiz_5_38.java
│ │ ├── Quiz_5_8_Student.java
│ │ ├── Quiz_5_25.java
│ │ ├── Quiz_5_48.java
│ │ ├── Quiz_5_44.java
│ │ ├── SentinelVaiue.java
│ │ ├── Quiz_5_16.java
│ │ ├── Quiz_5_26.java
│ │ ├── Quiz_5_50.java
│ │ ├── Quiz_5_10.java
│ │ ├── Quiz_5_33.java
│ │ ├── MulitplicationTable.java
│ │ ├── Quiz_5_41.java
│ │ ├── Quiz_5_14.java
│ │ ├── Dec2Hex.java
│ │ ├── Quiz_5_40.java
│ │ ├── Quiz_5_20.java
│ │ ├── Quiz_5_18.java
│ │ ├── Quiz_5_39.java
│ │ ├── Quiz_5_29.java
│ │ ├── Quiz_5_43.java
│ │ ├── GuessNum.java
│ │ ├── Palindrome.java
│ │ ├── PrintNum.java
│ │ └── GfreatestCommonDivisor.java
└── Ch05.iml
├── Ch06
├── .idea
│ ├── description.html
│ ├── encodings.xml
│ ├── vcs.xml
│ ├── modules.xml
│ ├── misc.xml
│ └── compiler.xml
├── out
│ └── production
│ │ └── Ch06
│ │ ├── Main.class
│ │ ├── Hex2Dec.class
│ │ ├── Quiz_5_2.class
│ │ ├── Quiz_5_3.class
│ │ ├── Quiz_6_1.class
│ │ ├── Quiz_6_4.class
│ │ ├── Quiz_6_5.class
│ │ ├── Quiz_6_6.class
│ │ ├── Quiz_6_7.class
│ │ ├── Quiz_6_17.class
│ │ ├── Quiz_6_18.class
│ │ ├── Quiz_6_21.class
│ │ ├── Quiz_6_22.class
│ │ ├── Quiz_6_25.class
│ │ ├── Quiz_6_26.class
│ │ ├── Quiz_6_27.class
│ │ ├── Quiz_6_28.class
│ │ ├── Quiz_6_29.class
│ │ ├── Quiz_6_30.class
│ │ ├── Quiz_6_31.class
│ │ ├── Quiz_6_32.class
│ │ ├── Quiz_6_33.class
│ │ ├── Quiz_6_37.class
│ │ ├── TestMethod.class
│ │ ├── PrimeNumMethod.class
│ │ ├── RandomCharacter.class
│ │ ├── TestRandomCharacter.class
│ │ └── GreatestCommonDivisorMethod.class
├── src
│ ├── Quiz_6_4.java
│ ├── TestMethod.java
│ ├── TestRandomCharacter.java
│ ├── Quiz_6_29.java
│ ├── Quiz_6_32.java
│ ├── Quiz_5_2.java
│ ├── Quiz_6_28.java
│ ├── Quiz_6_1.java
│ ├── Quiz_6_17.java
│ ├── RandomCharacter.java
│ ├── Quiz_6_22.java
│ ├── Quiz_6_25.java
│ ├── Quiz_6_26.java
│ ├── Quiz_6_6.java
│ ├── Quiz_6_27.java
│ ├── Quiz_6_37.java
│ ├── Hex2Dec.java
│ ├── Quiz_6_7.java
│ └── GreatestCommonDivisorMethod.java
└── Ch06.iml
├── Ch08
├── .idea
│ ├── description.html
│ ├── encodings.xml
│ ├── vcs.xml
│ ├── modules.xml
│ ├── misc.xml
│ └── compiler.xml
├── out
│ └── production
│ │ └── Ch08
│ │ ├── Array.class
│ │ ├── Main.class
│ │ ├── Quiz_8_1.class
│ │ ├── Quiz_8_2.class
│ │ ├── Quiz_8_4.class
│ │ ├── Quiz_8_6.class
│ │ ├── Quiz_8_9.class
│ │ ├── Solution.class
│ │ ├── Weather.class
│ │ ├── GradeExam.class
│ │ ├── Quiz_8_11.class
│ │ ├── Quiz_8_14.class
│ │ ├── Quiz_8_16.class
│ │ ├── Test2Array.class
│ │ └── FindNearestPoint.class
├── Ch08.iml
└── src
│ ├── Quiz_8_2.java
│ ├── Quiz_8_6.java
│ ├── GradeExam.java
│ └── Quiz_8_1.java
├── Ch09
├── .idea
│ ├── description.html
│ ├── encodings.xml
│ ├── vcs.xml
│ ├── modules.xml
│ ├── misc.xml
│ └── compiler.xml
├── out
│ └── production
│ │ └── Ch09
│ │ ├── Main.class
│ │ ├── Quiz_9_3_Date.class
│ │ ├── Quiz_9_2_Stock.class
│ │ ├── Quiz_9_4_Random.class
│ │ ├── Quiz_9_13_Location.class
│ │ ├── Quiz_9_1_Rectangle.class
│ │ ├── Quiz_9_6_StopWatch.class
│ │ ├── Quiz_9_9_RegularPolygon.class
│ │ └── Quiz_9_5_GregroianCalendar.class
├── Ch09.iml
└── src
│ ├── Quiz_9_4_Random.java
│ ├── Quiz_9_3_Date.java
│ ├── Quiz_9_6_StopWatch.java
│ ├── Quiz_9_1_Rectangle.java
│ ├── Quiz_9_5_GregroianCalendar.java
│ └── Quiz_9_2_Stock.java
├── Ch10
├── .idea
│ ├── description.html
│ ├── encodings.xml
│ ├── vcs.xml
│ ├── modules.xml
│ ├── misc.xml
│ └── compiler.xml
├── out
│ └── production
│ │ └── Ch10
│ │ ├── Main.class
│ │ ├── Parse.class
│ │ ├── Test.class
│ │ ├── LargeFactorial.class
│ │ ├── TestStringBuilder.class
│ │ └── PalindromIgnoreNonAlphanumeric.class
├── src
│ ├── Parse.java
│ ├── Test.java
│ └── LargeFactorial.java
└── Ch10.iml
├── Ch11
├── .idea
│ ├── description.html
│ ├── encodings.xml
│ ├── vcs.xml
│ ├── modules.xml
│ ├── misc.xml
│ └── compiler.xml
├── out
│ └── production
│ │ └── Ch11
│ │ ├── Main.class
│ │ ├── ClassA.class
│ │ ├── ClassB.class
│ │ ├── MyStack.class
│ │ ├── CastingDemo.class
│ │ ├── TestArrayList.class
│ │ ├── DistincNumbers.class
│ │ ├── Quiz_11_2_Staff.class
│ │ ├── TestInstanceOf.class
│ │ ├── Quiz11_1_Triangle.class
│ │ ├── Quiz_11_10_MyStack.class
│ │ ├── Quiz_11_13_Remove.class
│ │ ├── Quiz_11_2_Employer.class
│ │ ├── Quiz_11_2_Faculty.class
│ │ ├── Quiz_11_2_Person.class
│ │ ├── Quiz_11_2_Student.class
│ │ ├── Quiz_11_8_Account.class
│ │ ├── Quiz_11_9_MaxNum.class
│ │ ├── ArrayListConverArray.class
│ │ ├── Quiz_11_Transaction.class
│ │ ├── TestCircleRectangle.class
│ │ ├── Quiz11_1_TestTriangle.class
│ │ ├── SimpleGeometricObject.class
│ │ ├── Quiz_11_3_MaxOfArraylist.class
│ │ ├── SuperClassTestInstanceOf.class
│ │ ├── CircleFromSimpleGeometricObject.class
│ │ └── RectangleFromSimpleGeometricObject.class
├── src
│ ├── SuperClassTestInstanceOf.java
│ ├── TestInstanceOf.java
│ ├── Quiz_11_14_Combination.java
│ ├── Quiz_11_2_Staff.java
│ ├── ClassA.java
│ ├── Quiz_11_2_Employer.java
│ ├── ClassB.java
│ ├── Quiz_11_2_Faculty.java
│ ├── Quiz_11_2_Person.java
│ ├── Quiz_11_3_MaxOfArraylist.java
│ ├── Quiz_11_13_Remove.java
│ ├── Quiz_11_2_Student.java
│ ├── Quiz_11_8_Account.java
│ ├── CastingDemo.java
│ ├── MyStack.java
│ └── Quiz_11_10_MyStack.java
└── Ch11.iml
└── .gitignore
/Ch12/score.txt:
--------------------------------------------------------------------------------
1 | zh 99
2 | wf 89
3 |
--------------------------------------------------------------------------------
/Ch07/src/Quz_7_14.java:
--------------------------------------------------------------------------------
1 | public class Quz_7_14 {
2 | }
3 |
--------------------------------------------------------------------------------
/Ch07/src/Quiz_7_13.java:
--------------------------------------------------------------------------------
1 | public class Quiz_7_13 {
2 |
3 | }
4 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/README.md
--------------------------------------------------------------------------------
/Ch01/.idea/description.html:
--------------------------------------------------------------------------------
1 | Simple Java application that includes a class with main() method
--------------------------------------------------------------------------------
/Ch01/out/production/Ch01/Main.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch01/out/production/Ch01/Main.class
--------------------------------------------------------------------------------
/Ch02/.idea/description.html:
--------------------------------------------------------------------------------
1 | Simple Java application that includes a class with main() method
--------------------------------------------------------------------------------
/Ch02/out/production/Ch02/Main.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch02/out/production/Ch02/Main.class
--------------------------------------------------------------------------------
/Ch03/.idea/description.html:
--------------------------------------------------------------------------------
1 | Simple Java application that includes a class with main() method
--------------------------------------------------------------------------------
/Ch03/out/production/Ch03/Main.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch03/out/production/Ch03/Main.class
--------------------------------------------------------------------------------
/Ch04/.idea/description.html:
--------------------------------------------------------------------------------
1 | Simple Java application that includes a class with main() method
--------------------------------------------------------------------------------
/Ch04/out/production/Ch04/Main.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch04/out/production/Ch04/Main.class
--------------------------------------------------------------------------------
/Ch05/.idea/description.html:
--------------------------------------------------------------------------------
1 | Simple Java application that includes a class with main() method
--------------------------------------------------------------------------------
/Ch05/.idea/project-template.xml:
--------------------------------------------------------------------------------
1 |
2 | IJ_BASE_PACKAGE
3 |
--------------------------------------------------------------------------------
/Ch06/.idea/description.html:
--------------------------------------------------------------------------------
1 | Simple Java application that includes a class with main() method
--------------------------------------------------------------------------------
/Ch06/out/production/Ch06/Main.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch06/out/production/Ch06/Main.class
--------------------------------------------------------------------------------
/Ch07/.idea/description.html:
--------------------------------------------------------------------------------
1 | Simple Java application that includes a class with main() method
--------------------------------------------------------------------------------
/Ch07/out/production/Ch07/Main.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch07/out/production/Ch07/Main.class
--------------------------------------------------------------------------------
/Ch08/.idea/description.html:
--------------------------------------------------------------------------------
1 | Simple Java application that includes a class with main() method
--------------------------------------------------------------------------------
/Ch08/out/production/Ch08/Array.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch08/out/production/Ch08/Array.class
--------------------------------------------------------------------------------
/Ch08/out/production/Ch08/Main.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch08/out/production/Ch08/Main.class
--------------------------------------------------------------------------------
/Ch09/.idea/description.html:
--------------------------------------------------------------------------------
1 | Simple Java application that includes a class with main() method
--------------------------------------------------------------------------------
/Ch09/out/production/Ch09/Main.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch09/out/production/Ch09/Main.class
--------------------------------------------------------------------------------
/Ch10/.idea/description.html:
--------------------------------------------------------------------------------
1 | Simple Java application that includes a class with main() method
--------------------------------------------------------------------------------
/Ch10/out/production/Ch10/Main.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch10/out/production/Ch10/Main.class
--------------------------------------------------------------------------------
/Ch10/out/production/Ch10/Parse.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch10/out/production/Ch10/Parse.class
--------------------------------------------------------------------------------
/Ch10/out/production/Ch10/Test.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch10/out/production/Ch10/Test.class
--------------------------------------------------------------------------------
/Ch11/.idea/description.html:
--------------------------------------------------------------------------------
1 | Simple Java application that includes a class with main() method
--------------------------------------------------------------------------------
/Ch11/out/production/Ch11/Main.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch11/out/production/Ch11/Main.class
--------------------------------------------------------------------------------
/Ch11/src/SuperClassTestInstanceOf.java:
--------------------------------------------------------------------------------
1 | /**
2 | * @author callmezh
3 | */
4 | public class SuperClassTestInstanceOf {
5 | }
6 |
--------------------------------------------------------------------------------
/Ch12/.idea/description.html:
--------------------------------------------------------------------------------
1 | Simple Java application that includes a class with main() method
--------------------------------------------------------------------------------
/Ch12/out/production/Ch12/Main.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch12/out/production/Ch12/Main.class
--------------------------------------------------------------------------------
/Ch12/out/production/Ch12/test.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch12/out/production/Ch12/test.class
--------------------------------------------------------------------------------
/Ch01/out/production/Ch01/quiz_1_3.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch01/out/production/Ch01/quiz_1_3.class
--------------------------------------------------------------------------------
/Ch01/out/production/Ch01/quiz_1_6.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch01/out/production/Ch01/quiz_1_6.class
--------------------------------------------------------------------------------
/Ch01/out/production/Ch01/quiz_1_7.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch01/out/production/Ch01/quiz_1_7.class
--------------------------------------------------------------------------------
/Ch02/out/production/Ch02/Quiz_2_6.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch02/out/production/Ch02/Quiz_2_6.class
--------------------------------------------------------------------------------
/Ch02/out/production/Ch02/SalesTax.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch02/out/production/Ch02/SalesTax.class
--------------------------------------------------------------------------------
/Ch03/out/production/Ch03/Lottery.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch03/out/production/Ch03/Lottery.class
--------------------------------------------------------------------------------
/Ch03/out/production/Ch03/Quiz_3_4.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch03/out/production/Ch03/Quiz_3_4.class
--------------------------------------------------------------------------------
/Ch03/out/production/Ch03/Quiz_3_5.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch03/out/production/Ch03/Quiz_3_5.class
--------------------------------------------------------------------------------
/Ch03/out/production/Ch03/Quiz_3_8.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch03/out/production/Ch03/Quiz_3_8.class
--------------------------------------------------------------------------------
/Ch03/out/production/Ch03/Quiz_3_9.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch03/out/production/Ch03/Quiz_3_9.class
--------------------------------------------------------------------------------
/Ch04/out/production/Ch04/Quiz_4_1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch04/out/production/Ch04/Quiz_4_1.class
--------------------------------------------------------------------------------
/Ch04/out/production/Ch04/Quiz_4_2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch04/out/production/Ch04/Quiz_4_2.class
--------------------------------------------------------------------------------
/Ch04/out/production/Ch04/Quiz_4_5.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch04/out/production/Ch04/Quiz_4_5.class
--------------------------------------------------------------------------------
/Ch04/out/production/Ch04/Quiz_4_6.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch04/out/production/Ch04/Quiz_4_6.class
--------------------------------------------------------------------------------
/Ch04/out/production/Ch04/Quiz_4_7.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch04/out/production/Ch04/Quiz_4_7.class
--------------------------------------------------------------------------------
/Ch04/out/production/Ch04/Quiz_4_8.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch04/out/production/Ch04/Quiz_4_8.class
--------------------------------------------------------------------------------
/Ch04/out/production/Ch04/Quiz_4_9.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch04/out/production/Ch04/Quiz_4_9.class
--------------------------------------------------------------------------------
/Ch06/out/production/Ch06/Hex2Dec.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch06/out/production/Ch06/Hex2Dec.class
--------------------------------------------------------------------------------
/Ch06/out/production/Ch06/Quiz_5_2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch06/out/production/Ch06/Quiz_5_2.class
--------------------------------------------------------------------------------
/Ch06/out/production/Ch06/Quiz_5_3.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch06/out/production/Ch06/Quiz_5_3.class
--------------------------------------------------------------------------------
/Ch06/out/production/Ch06/Quiz_6_1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch06/out/production/Ch06/Quiz_6_1.class
--------------------------------------------------------------------------------
/Ch06/out/production/Ch06/Quiz_6_4.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch06/out/production/Ch06/Quiz_6_4.class
--------------------------------------------------------------------------------
/Ch06/out/production/Ch06/Quiz_6_5.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch06/out/production/Ch06/Quiz_6_5.class
--------------------------------------------------------------------------------
/Ch06/out/production/Ch06/Quiz_6_6.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch06/out/production/Ch06/Quiz_6_6.class
--------------------------------------------------------------------------------
/Ch06/out/production/Ch06/Quiz_6_7.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch06/out/production/Ch06/Quiz_6_7.class
--------------------------------------------------------------------------------
/Ch07/out/production/Ch07/Quiz_7_1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch07/out/production/Ch07/Quiz_7_1.class
--------------------------------------------------------------------------------
/Ch07/out/production/Ch07/Quiz_7_2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch07/out/production/Ch07/Quiz_7_2.class
--------------------------------------------------------------------------------
/Ch07/out/production/Ch07/Quiz_7_3.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch07/out/production/Ch07/Quiz_7_3.class
--------------------------------------------------------------------------------
/Ch07/out/production/Ch07/Quiz_7_4.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch07/out/production/Ch07/Quiz_7_4.class
--------------------------------------------------------------------------------
/Ch07/out/production/Ch07/Quiz_7_5.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch07/out/production/Ch07/Quiz_7_5.class
--------------------------------------------------------------------------------
/Ch07/out/production/Ch07/Quiz_7_6.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch07/out/production/Ch07/Quiz_7_6.class
--------------------------------------------------------------------------------
/Ch07/out/production/Ch07/Quiz_7_7.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch07/out/production/Ch07/Quiz_7_7.class
--------------------------------------------------------------------------------
/Ch07/out/production/Ch07/Quiz_7_8.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch07/out/production/Ch07/Quiz_7_8.class
--------------------------------------------------------------------------------
/Ch07/out/production/Ch07/Quiz_7_9.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch07/out/production/Ch07/Quiz_7_9.class
--------------------------------------------------------------------------------
/Ch07/out/production/Ch07/Quz_7_14.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch07/out/production/Ch07/Quz_7_14.class
--------------------------------------------------------------------------------
/Ch08/out/production/Ch08/Quiz_8_1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch08/out/production/Ch08/Quiz_8_1.class
--------------------------------------------------------------------------------
/Ch08/out/production/Ch08/Quiz_8_2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch08/out/production/Ch08/Quiz_8_2.class
--------------------------------------------------------------------------------
/Ch08/out/production/Ch08/Quiz_8_4.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch08/out/production/Ch08/Quiz_8_4.class
--------------------------------------------------------------------------------
/Ch08/out/production/Ch08/Quiz_8_6.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch08/out/production/Ch08/Quiz_8_6.class
--------------------------------------------------------------------------------
/Ch08/out/production/Ch08/Quiz_8_9.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch08/out/production/Ch08/Quiz_8_9.class
--------------------------------------------------------------------------------
/Ch08/out/production/Ch08/Solution.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch08/out/production/Ch08/Solution.class
--------------------------------------------------------------------------------
/Ch08/out/production/Ch08/Weather.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch08/out/production/Ch08/Weather.class
--------------------------------------------------------------------------------
/Ch11/out/production/Ch11/ClassA.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch11/out/production/Ch11/ClassA.class
--------------------------------------------------------------------------------
/Ch11/out/production/Ch11/ClassB.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch11/out/production/Ch11/ClassB.class
--------------------------------------------------------------------------------
/Ch11/out/production/Ch11/MyStack.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch11/out/production/Ch11/MyStack.class
--------------------------------------------------------------------------------
/Ch12/out/production/Ch12/ReadData.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch12/out/production/Ch12/ReadData.class
--------------------------------------------------------------------------------
/Ch01/out/production/Ch01/quiz_1_10.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch01/out/production/Ch01/quiz_1_10.class
--------------------------------------------------------------------------------
/Ch01/out/production/Ch01/quiz_1_11.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch01/out/production/Ch01/quiz_1_11.class
--------------------------------------------------------------------------------
/Ch01/out/production/Ch01/quiz_1_13.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch01/out/production/Ch01/quiz_1_13.class
--------------------------------------------------------------------------------
/Ch02/out/production/Ch02/Quiz_2_13.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch02/out/production/Ch02/Quiz_2_13.class
--------------------------------------------------------------------------------
/Ch02/out/production/Ch02/Quiz_2_17.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch02/out/production/Ch02/Quiz_2_17.class
--------------------------------------------------------------------------------
/Ch02/out/production/Ch02/Quiz_2_23.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch02/out/production/Ch02/Quiz_2_23.class
--------------------------------------------------------------------------------
/Ch03/out/production/Ch03/ComputeTax.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch03/out/production/Ch03/ComputeTax.class
--------------------------------------------------------------------------------
/Ch03/out/production/Ch03/Quiz_3_11.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch03/out/production/Ch03/Quiz_3_11.class
--------------------------------------------------------------------------------
/Ch03/out/production/Ch03/Quiz_3_12.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch03/out/production/Ch03/Quiz_3_12.class
--------------------------------------------------------------------------------
/Ch03/out/production/Ch03/Quiz_3_14.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch03/out/production/Ch03/Quiz_3_14.class
--------------------------------------------------------------------------------
/Ch03/out/production/Ch03/Quiz_3_16.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch03/out/production/Ch03/Quiz_3_16.class
--------------------------------------------------------------------------------
/Ch03/out/production/Ch03/Quiz_3_18.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch03/out/production/Ch03/Quiz_3_18.class
--------------------------------------------------------------------------------
/Ch03/out/production/Ch03/Quiz_3_19.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch03/out/production/Ch03/Quiz_3_19.class
--------------------------------------------------------------------------------
/Ch03/out/production/Ch03/Quiz_3_21.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch03/out/production/Ch03/Quiz_3_21.class
--------------------------------------------------------------------------------
/Ch03/out/production/Ch03/Quiz_3_22.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch03/out/production/Ch03/Quiz_3_22.class
--------------------------------------------------------------------------------
/Ch03/out/production/Ch03/Quiz_3_23.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch03/out/production/Ch03/Quiz_3_23.class
--------------------------------------------------------------------------------
/Ch03/out/production/Ch03/Quiz_3_24.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch03/out/production/Ch03/Quiz_3_24.class
--------------------------------------------------------------------------------
/Ch03/out/production/Ch03/Quiz_3_27.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch03/out/production/Ch03/Quiz_3_27.class
--------------------------------------------------------------------------------
/Ch03/out/production/Ch03/Quiz_3_28.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch03/out/production/Ch03/Quiz_3_28.class
--------------------------------------------------------------------------------
/Ch03/out/production/Ch03/Quiz_3_29.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch03/out/production/Ch03/Quiz_3_29.class
--------------------------------------------------------------------------------
/Ch03/out/production/Ch03/Quiz_3_31.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch03/out/production/Ch03/Quiz_3_31.class
--------------------------------------------------------------------------------
/Ch03/out/production/Ch03/Quiz_3_32.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch03/out/production/Ch03/Quiz_3_32.class
--------------------------------------------------------------------------------
/Ch03/out/production/Ch03/Quiz_3_33.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch03/out/production/Ch03/Quiz_3_33.class
--------------------------------------------------------------------------------
/Ch03/out/production/Ch03/Quiz_3_34.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch03/out/production/Ch03/Quiz_3_34.class
--------------------------------------------------------------------------------
/Ch04/out/production/Ch04/FormatDemo.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch04/out/production/Ch04/FormatDemo.class
--------------------------------------------------------------------------------
/Ch04/out/production/Ch04/Quiz_4_11.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch04/out/production/Ch04/Quiz_4_11.class
--------------------------------------------------------------------------------
/Ch04/out/production/Ch04/Quiz_4_12.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch04/out/production/Ch04/Quiz_4_12.class
--------------------------------------------------------------------------------
/Ch04/out/production/Ch04/Quiz_4_13.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch04/out/production/Ch04/Quiz_4_13.class
--------------------------------------------------------------------------------
/Ch04/out/production/Ch04/Quiz_4_14.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch04/out/production/Ch04/Quiz_4_14.class
--------------------------------------------------------------------------------
/Ch04/out/production/Ch04/Quiz_4_15.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch04/out/production/Ch04/Quiz_4_15.class
--------------------------------------------------------------------------------
/Ch04/out/production/Ch04/Quiz_4_16.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch04/out/production/Ch04/Quiz_4_16.class
--------------------------------------------------------------------------------
/Ch04/out/production/Ch04/Quiz_4_17.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch04/out/production/Ch04/Quiz_4_17.class
--------------------------------------------------------------------------------
/Ch04/out/production/Ch04/Quiz_4_18.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch04/out/production/Ch04/Quiz_4_18.class
--------------------------------------------------------------------------------
/Ch04/out/production/Ch04/Quiz_4_19.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch04/out/production/Ch04/Quiz_4_19.class
--------------------------------------------------------------------------------
/Ch04/out/production/Ch04/Quiz_4_20.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch04/out/production/Ch04/Quiz_4_20.class
--------------------------------------------------------------------------------
/Ch04/out/production/Ch04/Quiz_4_21.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch04/out/production/Ch04/Quiz_4_21.class
--------------------------------------------------------------------------------
/Ch04/out/production/Ch04/Quiz_4_23.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch04/out/production/Ch04/Quiz_4_23.class
--------------------------------------------------------------------------------
/Ch04/out/production/Ch04/Quiz_4_24.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch04/out/production/Ch04/Quiz_4_24.class
--------------------------------------------------------------------------------
/Ch04/out/production/Ch04/Quiz_4_25.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch04/out/production/Ch04/Quiz_4_25.class
--------------------------------------------------------------------------------
/Ch04/out/production/Ch04/TestPrintf.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch04/out/production/Ch04/TestPrintf.class
--------------------------------------------------------------------------------
/Ch04/out/production/Ch04/TestString.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch04/out/production/Ch04/TestString.class
--------------------------------------------------------------------------------
/Ch06/out/production/Ch06/Quiz_6_17.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch06/out/production/Ch06/Quiz_6_17.class
--------------------------------------------------------------------------------
/Ch06/out/production/Ch06/Quiz_6_18.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch06/out/production/Ch06/Quiz_6_18.class
--------------------------------------------------------------------------------
/Ch06/out/production/Ch06/Quiz_6_21.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch06/out/production/Ch06/Quiz_6_21.class
--------------------------------------------------------------------------------
/Ch06/out/production/Ch06/Quiz_6_22.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch06/out/production/Ch06/Quiz_6_22.class
--------------------------------------------------------------------------------
/Ch06/out/production/Ch06/Quiz_6_25.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch06/out/production/Ch06/Quiz_6_25.class
--------------------------------------------------------------------------------
/Ch06/out/production/Ch06/Quiz_6_26.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch06/out/production/Ch06/Quiz_6_26.class
--------------------------------------------------------------------------------
/Ch06/out/production/Ch06/Quiz_6_27.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch06/out/production/Ch06/Quiz_6_27.class
--------------------------------------------------------------------------------
/Ch06/out/production/Ch06/Quiz_6_28.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch06/out/production/Ch06/Quiz_6_28.class
--------------------------------------------------------------------------------
/Ch06/out/production/Ch06/Quiz_6_29.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch06/out/production/Ch06/Quiz_6_29.class
--------------------------------------------------------------------------------
/Ch06/out/production/Ch06/Quiz_6_30.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch06/out/production/Ch06/Quiz_6_30.class
--------------------------------------------------------------------------------
/Ch06/out/production/Ch06/Quiz_6_31.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch06/out/production/Ch06/Quiz_6_31.class
--------------------------------------------------------------------------------
/Ch06/out/production/Ch06/Quiz_6_32.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch06/out/production/Ch06/Quiz_6_32.class
--------------------------------------------------------------------------------
/Ch06/out/production/Ch06/Quiz_6_33.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch06/out/production/Ch06/Quiz_6_33.class
--------------------------------------------------------------------------------
/Ch06/out/production/Ch06/Quiz_6_37.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch06/out/production/Ch06/Quiz_6_37.class
--------------------------------------------------------------------------------
/Ch06/out/production/Ch06/TestMethod.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch06/out/production/Ch06/TestMethod.class
--------------------------------------------------------------------------------
/Ch07/out/production/Ch07/AnalyzeNum.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch07/out/production/Ch07/AnalyzeNum.class
--------------------------------------------------------------------------------
/Ch07/out/production/Ch07/DeckOfCard.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch07/out/production/Ch07/DeckOfCard.class
--------------------------------------------------------------------------------
/Ch07/out/production/Ch07/Quiz_7_10.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch07/out/production/Ch07/Quiz_7_10.class
--------------------------------------------------------------------------------
/Ch07/out/production/Ch07/Quiz_7_12.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch07/out/production/Ch07/Quiz_7_12.class
--------------------------------------------------------------------------------
/Ch07/out/production/Ch07/Quiz_7_13.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch07/out/production/Ch07/Quiz_7_13.class
--------------------------------------------------------------------------------
/Ch07/out/production/Ch07/Quiz_7_15.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch07/out/production/Ch07/Quiz_7_15.class
--------------------------------------------------------------------------------
/Ch07/out/production/Ch07/Quiz_7_16.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch07/out/production/Ch07/Quiz_7_16.class
--------------------------------------------------------------------------------
/Ch07/out/production/Ch07/Quiz_7_17.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch07/out/production/Ch07/Quiz_7_17.class
--------------------------------------------------------------------------------
/Ch07/out/production/Ch07/Quiz_7_18.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch07/out/production/Ch07/Quiz_7_18.class
--------------------------------------------------------------------------------
/Ch07/out/production/Ch07/Quiz_7_19.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch07/out/production/Ch07/Quiz_7_19.class
--------------------------------------------------------------------------------
/Ch07/out/production/Ch07/Quiz_7_20.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch07/out/production/Ch07/Quiz_7_20.class
--------------------------------------------------------------------------------
/Ch07/out/production/Ch07/Quiz_7_21.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch07/out/production/Ch07/Quiz_7_21.class
--------------------------------------------------------------------------------
/Ch07/out/production/Ch07/Quiz_7_23.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch07/out/production/Ch07/Quiz_7_23.class
--------------------------------------------------------------------------------
/Ch07/out/production/Ch07/Quiz_7_24.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch07/out/production/Ch07/Quiz_7_24.class
--------------------------------------------------------------------------------
/Ch07/out/production/Ch07/Quiz_7_28.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch07/out/production/Ch07/Quiz_7_28.class
--------------------------------------------------------------------------------
/Ch07/out/production/Ch07/Quiz_7_29.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch07/out/production/Ch07/Quiz_7_29.class
--------------------------------------------------------------------------------
/Ch07/out/production/Ch07/Quiz_7_30.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch07/out/production/Ch07/Quiz_7_30.class
--------------------------------------------------------------------------------
/Ch07/out/production/Ch07/Quiz_7_32.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch07/out/production/Ch07/Quiz_7_32.class
--------------------------------------------------------------------------------
/Ch07/out/production/Ch07/Quiz_7_34.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch07/out/production/Ch07/Quiz_7_34.class
--------------------------------------------------------------------------------
/Ch07/out/production/Ch07/Quiz_7_35.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch07/out/production/Ch07/Quiz_7_35.class
--------------------------------------------------------------------------------
/Ch07/out/production/Ch07/TestArray.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch07/out/production/Ch07/TestArray.class
--------------------------------------------------------------------------------
/Ch08/out/production/Ch08/GradeExam.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch08/out/production/Ch08/GradeExam.class
--------------------------------------------------------------------------------
/Ch08/out/production/Ch08/Quiz_8_11.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch08/out/production/Ch08/Quiz_8_11.class
--------------------------------------------------------------------------------
/Ch08/out/production/Ch08/Quiz_8_14.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch08/out/production/Ch08/Quiz_8_14.class
--------------------------------------------------------------------------------
/Ch08/out/production/Ch08/Quiz_8_16.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch08/out/production/Ch08/Quiz_8_16.class
--------------------------------------------------------------------------------
/Ch08/out/production/Ch08/Test2Array.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch08/out/production/Ch08/Test2Array.class
--------------------------------------------------------------------------------
/Ch12/out/production/Ch12/WebCrawler.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch12/out/production/Ch12/WebCrawler.class
--------------------------------------------------------------------------------
/Ch12/out/production/Ch12/WriteData.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch12/out/production/Ch12/WriteData.class
--------------------------------------------------------------------------------
/Ch02/out/production/Ch02/ComputeChange.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch02/out/production/Ch02/ComputeChange.class
--------------------------------------------------------------------------------
/Ch02/out/production/Ch02/ComputeLoan.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch02/out/production/Ch02/ComputeLoan.class
--------------------------------------------------------------------------------
/Ch03/out/production/Ch03/AdditionQuiz.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch03/out/production/Ch03/AdditionQuiz.class
--------------------------------------------------------------------------------
/Ch04/out/production/Ch04/HexDigit2Dec.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch04/out/production/Ch04/HexDigit2Dec.class
--------------------------------------------------------------------------------
/Ch07/out/production/Ch07/BinarySearch.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch07/out/production/Ch07/BinarySearch.class
--------------------------------------------------------------------------------
/Ch07/out/production/Ch07/InputInteger.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch07/out/production/Ch07/InputInteger.class
--------------------------------------------------------------------------------
/Ch07/out/production/Ch07/ReturnArrary.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch07/out/production/Ch07/ReturnArrary.class
--------------------------------------------------------------------------------
/Ch07/out/production/Ch07/SelectionSort.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch07/out/production/Ch07/SelectionSort.class
--------------------------------------------------------------------------------
/Ch07/out/production/Ch07/VarArgsDemo.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch07/out/production/Ch07/VarArgsDemo.class
--------------------------------------------------------------------------------
/Ch09/out/production/Ch09/Quiz_9_3_Date.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch09/out/production/Ch09/Quiz_9_3_Date.class
--------------------------------------------------------------------------------
/Ch11/out/production/Ch11/CastingDemo.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch11/out/production/Ch11/CastingDemo.class
--------------------------------------------------------------------------------
/Ch11/out/production/Ch11/TestArrayList.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch11/out/production/Ch11/TestArrayList.class
--------------------------------------------------------------------------------
/Ch12/out/production/Ch12/ReplaceText.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch12/out/production/Ch12/ReplaceText.class
--------------------------------------------------------------------------------
/Ch12/out/production/Ch12/TestFileClass.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch12/out/production/Ch12/TestFileClass.class
--------------------------------------------------------------------------------
/Ch02/out/production/Ch02/ShowCurrentTime.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch02/out/production/Ch02/ShowCurrentTime.class
--------------------------------------------------------------------------------
/Ch03/out/production/Ch03/SubtractionQuiz.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch03/out/production/Ch03/SubtractionQuiz.class
--------------------------------------------------------------------------------
/Ch04/out/production/Ch04/OrderTwoCities.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch04/out/production/Ch04/OrderTwoCities.class
--------------------------------------------------------------------------------
/Ch06/out/production/Ch06/PrimeNumMethod.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch06/out/production/Ch06/PrimeNumMethod.class
--------------------------------------------------------------------------------
/Ch06/out/production/Ch06/RandomCharacter.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch06/out/production/Ch06/RandomCharacter.class
--------------------------------------------------------------------------------
/Ch07/out/production/Ch07/ArrayCopyMethod.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch07/out/production/Ch07/ArrayCopyMethod.class
--------------------------------------------------------------------------------
/Ch09/out/production/Ch09/Quiz_9_2_Stock.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch09/out/production/Ch09/Quiz_9_2_Stock.class
--------------------------------------------------------------------------------
/Ch09/out/production/Ch09/Quiz_9_4_Random.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch09/out/production/Ch09/Quiz_9_4_Random.class
--------------------------------------------------------------------------------
/Ch10/out/production/Ch10/LargeFactorial.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch10/out/production/Ch10/LargeFactorial.class
--------------------------------------------------------------------------------
/Ch11/out/production/Ch11/DistincNumbers.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch11/out/production/Ch11/DistincNumbers.class
--------------------------------------------------------------------------------
/Ch11/out/production/Ch11/Quiz_11_2_Staff.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch11/out/production/Ch11/Quiz_11_2_Staff.class
--------------------------------------------------------------------------------
/Ch11/out/production/Ch11/TestInstanceOf.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch11/out/production/Ch11/TestInstanceOf.class
--------------------------------------------------------------------------------
/Ch11/src/TestInstanceOf.java:
--------------------------------------------------------------------------------
1 | /**
2 | * @author callmezh
3 | */
4 | public class TestInstanceOf extends SuperClassTestInstanceOf{
5 |
6 | }
7 |
--------------------------------------------------------------------------------
/Ch12/out/production/Ch12/ReadFileFromURL.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch12/out/production/Ch12/ReadFileFromURL.class
--------------------------------------------------------------------------------
/Ch03/out/production/Ch03/DoubleEquivalence.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch03/out/production/Ch03/DoubleEquivalence.class
--------------------------------------------------------------------------------
/Ch04/out/production/Ch04/LotteryUsingString.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch04/out/production/Ch04/LotteryUsingString.class
--------------------------------------------------------------------------------
/Ch05/out/production/Ch05/com/company/Cost.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch05/out/production/Ch05/com/company/Cost.class
--------------------------------------------------------------------------------
/Ch05/out/production/Ch05/com/company/Main.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch05/out/production/Ch05/com/company/Main.class
--------------------------------------------------------------------------------
/Ch07/out/production/Ch07/CountLetterInArray.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch07/out/production/Ch07/CountLetterInArray.class
--------------------------------------------------------------------------------
/Ch08/out/production/Ch08/FindNearestPoint.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch08/out/production/Ch08/FindNearestPoint.class
--------------------------------------------------------------------------------
/Ch09/out/production/Ch09/Quiz_9_13_Location.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch09/out/production/Ch09/Quiz_9_13_Location.class
--------------------------------------------------------------------------------
/Ch09/out/production/Ch09/Quiz_9_1_Rectangle.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch09/out/production/Ch09/Quiz_9_1_Rectangle.class
--------------------------------------------------------------------------------
/Ch09/out/production/Ch09/Quiz_9_6_StopWatch.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch09/out/production/Ch09/Quiz_9_6_StopWatch.class
--------------------------------------------------------------------------------
/Ch10/out/production/Ch10/TestStringBuilder.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch10/out/production/Ch10/TestStringBuilder.class
--------------------------------------------------------------------------------
/Ch11/out/production/Ch11/Quiz11_1_Triangle.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch11/out/production/Ch11/Quiz11_1_Triangle.class
--------------------------------------------------------------------------------
/Ch11/out/production/Ch11/Quiz_11_10_MyStack.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch11/out/production/Ch11/Quiz_11_10_MyStack.class
--------------------------------------------------------------------------------
/Ch11/out/production/Ch11/Quiz_11_13_Remove.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch11/out/production/Ch11/Quiz_11_13_Remove.class
--------------------------------------------------------------------------------
/Ch11/out/production/Ch11/Quiz_11_2_Employer.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch11/out/production/Ch11/Quiz_11_2_Employer.class
--------------------------------------------------------------------------------
/Ch11/out/production/Ch11/Quiz_11_2_Faculty.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch11/out/production/Ch11/Quiz_11_2_Faculty.class
--------------------------------------------------------------------------------
/Ch11/out/production/Ch11/Quiz_11_2_Person.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch11/out/production/Ch11/Quiz_11_2_Person.class
--------------------------------------------------------------------------------
/Ch11/out/production/Ch11/Quiz_11_2_Student.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch11/out/production/Ch11/Quiz_11_2_Student.class
--------------------------------------------------------------------------------
/Ch11/out/production/Ch11/Quiz_11_8_Account.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch11/out/production/Ch11/Quiz_11_8_Account.class
--------------------------------------------------------------------------------
/Ch11/out/production/Ch11/Quiz_11_9_MaxNum.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch11/out/production/Ch11/Quiz_11_9_MaxNum.class
--------------------------------------------------------------------------------
/Ch05/out/production/Ch05/com/company/Dec2Hex.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch05/out/production/Ch05/com/company/Dec2Hex.class
--------------------------------------------------------------------------------
/Ch05/out/production/Ch05/com/company/GuessNum.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch05/out/production/Ch05/com/company/GuessNum.class
--------------------------------------------------------------------------------
/Ch05/out/production/Ch05/com/company/PrintNum.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch05/out/production/Ch05/com/company/PrintNum.class
--------------------------------------------------------------------------------
/Ch05/out/production/Ch05/com/company/Quiz_5_8.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch05/out/production/Ch05/com/company/Quiz_5_8.class
--------------------------------------------------------------------------------
/Ch06/out/production/Ch06/TestRandomCharacter.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch06/out/production/Ch06/TestRandomCharacter.class
--------------------------------------------------------------------------------
/Ch11/out/production/Ch11/ArrayListConverArray.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch11/out/production/Ch11/ArrayListConverArray.class
--------------------------------------------------------------------------------
/Ch11/out/production/Ch11/Quiz_11_Transaction.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch11/out/production/Ch11/Quiz_11_Transaction.class
--------------------------------------------------------------------------------
/Ch11/out/production/Ch11/TestCircleRectangle.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch11/out/production/Ch11/TestCircleRectangle.class
--------------------------------------------------------------------------------
/Ch12/out/production/Ch12/ChainedExceptionDemo.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch12/out/production/Ch12/ChainedExceptionDemo.class
--------------------------------------------------------------------------------
/Ch03/out/production/Ch03/ComputeAndInterpretBMI.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch03/out/production/Ch03/ComputeAndInterpretBMI.class
--------------------------------------------------------------------------------
/Ch05/out/production/Ch05/com/company/ChangKG2B.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch05/out/production/Ch05/com/company/ChangKG2B.class
--------------------------------------------------------------------------------
/Ch05/out/production/Ch05/com/company/ComputeCost.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch05/out/production/Ch05/com/company/ComputeCost.class
--------------------------------------------------------------------------------
/Ch05/out/production/Ch05/com/company/Palindrome.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch05/out/production/Ch05/com/company/Palindrome.class
--------------------------------------------------------------------------------
/Ch05/out/production/Ch05/com/company/Quiz_5_10.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch05/out/production/Ch05/com/company/Quiz_5_10.class
--------------------------------------------------------------------------------
/Ch05/out/production/Ch05/com/company/Quiz_5_14.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch05/out/production/Ch05/com/company/Quiz_5_14.class
--------------------------------------------------------------------------------
/Ch05/out/production/Ch05/com/company/Quiz_5_15.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch05/out/production/Ch05/com/company/Quiz_5_15.class
--------------------------------------------------------------------------------
/Ch05/out/production/Ch05/com/company/Quiz_5_16.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch05/out/production/Ch05/com/company/Quiz_5_16.class
--------------------------------------------------------------------------------
/Ch05/out/production/Ch05/com/company/Quiz_5_17.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch05/out/production/Ch05/com/company/Quiz_5_17.class
--------------------------------------------------------------------------------
/Ch05/out/production/Ch05/com/company/Quiz_5_18.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch05/out/production/Ch05/com/company/Quiz_5_18.class
--------------------------------------------------------------------------------
/Ch05/out/production/Ch05/com/company/Quiz_5_19.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch05/out/production/Ch05/com/company/Quiz_5_19.class
--------------------------------------------------------------------------------
/Ch05/out/production/Ch05/com/company/Quiz_5_20.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch05/out/production/Ch05/com/company/Quiz_5_20.class
--------------------------------------------------------------------------------
/Ch05/out/production/Ch05/com/company/Quiz_5_21.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch05/out/production/Ch05/com/company/Quiz_5_21.class
--------------------------------------------------------------------------------
/Ch05/out/production/Ch05/com/company/Quiz_5_23.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch05/out/production/Ch05/com/company/Quiz_5_23.class
--------------------------------------------------------------------------------
/Ch05/out/production/Ch05/com/company/Quiz_5_24.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch05/out/production/Ch05/com/company/Quiz_5_24.class
--------------------------------------------------------------------------------
/Ch05/out/production/Ch05/com/company/Quiz_5_25.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch05/out/production/Ch05/com/company/Quiz_5_25.class
--------------------------------------------------------------------------------
/Ch05/out/production/Ch05/com/company/Quiz_5_26.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch05/out/production/Ch05/com/company/Quiz_5_26.class
--------------------------------------------------------------------------------
/Ch05/out/production/Ch05/com/company/Quiz_5_27.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch05/out/production/Ch05/com/company/Quiz_5_27.class
--------------------------------------------------------------------------------
/Ch05/out/production/Ch05/com/company/Quiz_5_28.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch05/out/production/Ch05/com/company/Quiz_5_28.class
--------------------------------------------------------------------------------
/Ch05/out/production/Ch05/com/company/Quiz_5_29.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch05/out/production/Ch05/com/company/Quiz_5_29.class
--------------------------------------------------------------------------------
/Ch05/out/production/Ch05/com/company/Quiz_5_30.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch05/out/production/Ch05/com/company/Quiz_5_30.class
--------------------------------------------------------------------------------
/Ch05/out/production/Ch05/com/company/Quiz_5_32.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch05/out/production/Ch05/com/company/Quiz_5_32.class
--------------------------------------------------------------------------------
/Ch05/out/production/Ch05/com/company/Quiz_5_33.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch05/out/production/Ch05/com/company/Quiz_5_33.class
--------------------------------------------------------------------------------
/Ch05/out/production/Ch05/com/company/Quiz_5_35.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch05/out/production/Ch05/com/company/Quiz_5_35.class
--------------------------------------------------------------------------------
/Ch05/out/production/Ch05/com/company/Quiz_5_37.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch05/out/production/Ch05/com/company/Quiz_5_37.class
--------------------------------------------------------------------------------
/Ch05/out/production/Ch05/com/company/Quiz_5_38.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch05/out/production/Ch05/com/company/Quiz_5_38.class
--------------------------------------------------------------------------------
/Ch05/out/production/Ch05/com/company/Quiz_5_39.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch05/out/production/Ch05/com/company/Quiz_5_39.class
--------------------------------------------------------------------------------
/Ch05/out/production/Ch05/com/company/Quiz_5_40.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch05/out/production/Ch05/com/company/Quiz_5_40.class
--------------------------------------------------------------------------------
/Ch05/out/production/Ch05/com/company/Quiz_5_41.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch05/out/production/Ch05/com/company/Quiz_5_41.class
--------------------------------------------------------------------------------
/Ch05/out/production/Ch05/com/company/Quiz_5_43.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch05/out/production/Ch05/com/company/Quiz_5_43.class
--------------------------------------------------------------------------------
/Ch05/out/production/Ch05/com/company/Quiz_5_44.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch05/out/production/Ch05/com/company/Quiz_5_44.class
--------------------------------------------------------------------------------
/Ch05/out/production/Ch05/com/company/Quiz_5_46.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch05/out/production/Ch05/com/company/Quiz_5_46.class
--------------------------------------------------------------------------------
/Ch05/out/production/Ch05/com/company/Quiz_5_47.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch05/out/production/Ch05/com/company/Quiz_5_47.class
--------------------------------------------------------------------------------
/Ch05/out/production/Ch05/com/company/Quiz_5_48.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch05/out/production/Ch05/com/company/Quiz_5_48.class
--------------------------------------------------------------------------------
/Ch05/out/production/Ch05/com/company/Quiz_5_49.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch05/out/production/Ch05/com/company/Quiz_5_49.class
--------------------------------------------------------------------------------
/Ch05/out/production/Ch05/com/company/Quiz_5_50.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch05/out/production/Ch05/com/company/Quiz_5_50.class
--------------------------------------------------------------------------------
/Ch05/out/production/Ch05/com/company/Quiz_5_51.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch05/out/production/Ch05/com/company/Quiz_5_51.class
--------------------------------------------------------------------------------
/Ch09/out/production/Ch09/Quiz_9_9_RegularPolygon.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch09/out/production/Ch09/Quiz_9_9_RegularPolygon.class
--------------------------------------------------------------------------------
/Ch10/src/Parse.java:
--------------------------------------------------------------------------------
1 | public class Parse {
2 | static int printResult(){
3 | int x = Integer.parseInt("11", 3);
4 | return x;
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/Ch11/out/production/Ch11/Quiz11_1_TestTriangle.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch11/out/production/Ch11/Quiz11_1_TestTriangle.class
--------------------------------------------------------------------------------
/Ch11/out/production/Ch11/SimpleGeometricObject.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch11/out/production/Ch11/SimpleGeometricObject.class
--------------------------------------------------------------------------------
/Ch12/out/production/Ch12/InvalidRadiusException.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch12/out/production/Ch12/InvalidRadiusException.class
--------------------------------------------------------------------------------
/Ch12/out/production/Ch12/QuotientWithException.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch12/out/production/Ch12/QuotientWithException.class
--------------------------------------------------------------------------------
/Ch05/out/production/Ch05/com/company/SentinelVaiue.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch05/out/production/Ch05/com/company/SentinelVaiue.class
--------------------------------------------------------------------------------
/Ch11/out/production/Ch11/Quiz_11_3_MaxOfArraylist.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch11/out/production/Ch11/Quiz_11_3_MaxOfArraylist.class
--------------------------------------------------------------------------------
/Ch11/out/production/Ch11/SuperClassTestInstanceOf.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch11/out/production/Ch11/SuperClassTestInstanceOf.class
--------------------------------------------------------------------------------
/Ch12/out/production/Ch12/CircleWithCustomException.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch12/out/production/Ch12/CircleWithCustomException.class
--------------------------------------------------------------------------------
/Ch05/out/production/Ch05/com/company/ComputeAverage.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch05/out/production/Ch05/com/company/ComputeAverage.class
--------------------------------------------------------------------------------
/Ch05/out/production/Ch05/com/company/Quiz_5_8_Student.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch05/out/production/Ch05/com/company/Quiz_5_8_Student.class
--------------------------------------------------------------------------------
/Ch06/out/production/Ch06/GreatestCommonDivisorMethod.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch06/out/production/Ch06/GreatestCommonDivisorMethod.class
--------------------------------------------------------------------------------
/Ch09/out/production/Ch09/Quiz_9_5_GregroianCalendar.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch09/out/production/Ch09/Quiz_9_5_GregroianCalendar.class
--------------------------------------------------------------------------------
/Ch10/out/production/Ch10/PalindromIgnoreNonAlphanumeric.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch10/out/production/Ch10/PalindromIgnoreNonAlphanumeric.class
--------------------------------------------------------------------------------
/Ch12/out/production/Ch12/Quiz_12_4_IllArgumentException.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch12/out/production/Ch12/Quiz_12_4_IllArgumentException.class
--------------------------------------------------------------------------------
/Ch12/out/production/Ch12/TestCircleWithCustomException.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch12/out/production/Ch12/TestCircleWithCustomException.class
--------------------------------------------------------------------------------
/Ch05/out/production/Ch05/com/company/MulitplicationTable.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch05/out/production/Ch05/com/company/MulitplicationTable.class
--------------------------------------------------------------------------------
/Ch05/out/production/Ch05/com/company/SubtractionQuizLoop.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch05/out/production/Ch05/com/company/SubtractionQuizLoop.class
--------------------------------------------------------------------------------
/Ch11/out/production/Ch11/CircleFromSimpleGeometricObject.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch11/out/production/Ch11/CircleFromSimpleGeometricObject.class
--------------------------------------------------------------------------------
/Ch05/out/production/Ch05/com/company/GfreatestCommonDivisor.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch05/out/production/Ch05/com/company/GfreatestCommonDivisor.class
--------------------------------------------------------------------------------
/Ch11/out/production/Ch11/RectangleFromSimpleGeometricObject.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch11/out/production/Ch11/RectangleFromSimpleGeometricObject.class
--------------------------------------------------------------------------------
/Ch12/out/production/Ch12/Quiz_12_1_NumberFormationException.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch12/out/production/Ch12/Quiz_12_1_NumberFormationException.class
--------------------------------------------------------------------------------
/Ch12/out/production/Ch12/Quiz_12_3_ArrayIndexOutBoundsException.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch12/out/production/Ch12/Quiz_12_3_ArrayIndexOutBoundsException.class
--------------------------------------------------------------------------------
/Ch12/out/production/Ch12/Quiz_12_4_ThrowIllegalArgumentException.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WHUISSZH/CodingJAVA/HEAD/Ch12/out/production/Ch12/Quiz_12_4_ThrowIllegalArgumentException.class
--------------------------------------------------------------------------------
/Ch01/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Ch02/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Ch02/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Ch03/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Ch03/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Ch04/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Ch04/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Ch06/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Ch06/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Ch07/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Ch07/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Ch08/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Ch08/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Ch09/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Ch09/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Ch10/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Ch10/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Ch11/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Ch11/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Ch12/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Ch12/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Ch04/src/Quiz_4_16.java:
--------------------------------------------------------------------------------
1 | public class Quiz_4_16 {
2 | public void showLetters(){
3 | char letter = (char)( 65 + Math.random() * 26 + 1);
4 | System.out.print("The letter is " + letter);
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/Ch01/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Ch01/.idea/artifacts/unnamed.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | $PROJECT_DIR$/out/artifacts/unnamed
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Ch10/src/Test.java:
--------------------------------------------------------------------------------
1 | /**
2 | * @author callmezh
3 | * 数据域问题
4 | */
5 | public class Test {
6 | String text;
7 |
8 | public Test(String str){
9 | //test不是上面定义的test,而是这里的构造方法的局部变量
10 | String text = str;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Ch11/src/Quiz_11_14_Combination.java:
--------------------------------------------------------------------------------
1 | import java.util.ArrayList;
2 |
3 | public class Quiz_11_14_Combination {
4 | public static ArrayList union(ArrayList list1, ArrayList list2){
5 | list2.addAll(list1);
6 | return list2;
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/Ch01/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Ch02/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Ch03/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Ch04/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Ch05/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Ch06/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Ch07/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Ch08/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Ch09/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Ch10/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Ch11/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Ch12/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Ch01/src/quiz_1_3.java:
--------------------------------------------------------------------------------
1 | public class quiz_1_3 {
2 | public static void StringTable(){
3 | System.out.println("i i^2 i^3");
4 | for(int i = 1; i < 5; i++){
5 | System.out.println( i + " " + i*i + " " + i*i*i );
6 | }
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/Ch11/src/Quiz_11_2_Staff.java:
--------------------------------------------------------------------------------
1 | public class Quiz_11_2_Staff extends Quiz_11_2_Employer {
2 | String postionTitle;
3 |
4 | Quiz_11_2_Staff(){
5 |
6 | }
7 |
8 | @Override
9 | public String toString(){
10 | return "Staff's title is " + postionTitle;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Ch11/src/ClassA.java:
--------------------------------------------------------------------------------
1 | /**
2 | * @author callmezh
3 | * 动态绑定
4 | */
5 | public class ClassA {
6 | int i = 7;
7 | ClassA(){
8 | setI(20);
9 | System.out.println("I from A is " + i);
10 | }
11 |
12 | public void setI(int i) {
13 | this.i = 2 * i;
14 | }
15 | }
--------------------------------------------------------------------------------
/Ch05/src/com/company/ChangKG2B.java:
--------------------------------------------------------------------------------
1 | package com.company;
2 |
3 | public class ChangKG2B {
4 | public void chang(){
5 | System.out.println(" 千克 磅");
6 | for (int i = 1; i < 200; i++){
7 | System.out.printf("%3d %.1f\n", i, (i * 2.2));
8 | }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Ch03/src/DoubleEquivalence.java:
--------------------------------------------------------------------------------
1 | public class DoubleEquivalence {
2 | static final double EPSILON = 1E-14;
3 | public static void compareDouble(){
4 | double x = 1 - 0.1 - 0.1 - 0.1 - 0.1 - 0.1;
5 | if (Math.abs(x - 0.5) < EPSILON){
6 | System.out.print( x + " is approximately 0.5");
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/Ch06/src/Quiz_6_4.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | class Quiz_6_4 {
4 | void showPalindrome(){
5 | Scanner input = new Scanner(System.in);
6 | System.out.print("Enter the number: ");
7 | String num = input.nextLine();
8 | System.out.printf("it's palindrome is %s", Quiz_5_3.reverse(num));
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Ch04/src/TestPrintf.java:
--------------------------------------------------------------------------------
1 | public class TestPrintf {
2 | public void text(){
3 | boolean b = true;
4 | double amount = 1234.456;
5 | double rate = 0.1;
6 | double interest = amount* rate;
7 | System.out.println(interest);
8 | System.out.printf("%e %s %b", interest, "java is the best", b);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Ch11/src/Quiz_11_2_Employer.java:
--------------------------------------------------------------------------------
1 | import java.util.Date;
2 |
3 | public class Quiz_11_2_Employer extends Quiz_11_2_Person{
4 | String workPlace;
5 | double salary;
6 | Date employeDate;
7 |
8 | Quiz_11_2_Employer(){
9 |
10 | }
11 |
12 | @Override
13 | public String toString(){
14 | return "Employee";
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Ch01/src/quiz_1_7.java:
--------------------------------------------------------------------------------
1 | public class quiz_1_7 {
2 | public static double practicePI(int n){
3 | if (n==1){
4 | System.out.println("请输入大于0的整数");
5 | return 1;
6 | }else {
7 | System.out.println("no problem");
8 | return practicePI(n - 2) + (Math.pow(-1, (n + 1) / 2 + 1) * (1.0 / n));
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled class file
2 | *.class
3 |
4 | # Log file
5 | *.log
6 |
7 | # BlueJ files
8 | *.ctxt
9 |
10 | # Mobile Tools for Java (J2ME)
11 | .mtj.tmp/
12 |
13 | # Package Files #
14 | *.jar
15 | *.war
16 | *.nar
17 | *.ear
18 | *.zip
19 | *.tar.gz
20 | *.rar
21 |
22 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
23 | hs_err_pid*
24 |
--------------------------------------------------------------------------------
/Ch05/src/com/company/Quiz_5_15.java:
--------------------------------------------------------------------------------
1 | package com.company;
2 |
3 | public class Quiz_5_15 {
4 | public void printACSII(){
5 | for (int i = (int)'!'; i <= (int)'~'; i++){
6 | if ((i - '!' + 1) % 10 == 0){
7 | System.out.printf("%3c\n", (char)i);
8 | }else
9 | System.out.printf("%3c", (char)i);
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Ch04/src/Quiz_4_20.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | public class Quiz_4_20 {
4 | public void showLetters(){
5 | Scanner input = new Scanner(System.in);
6 | System.out.printf("Enter a string: ");
7 | String str = input.nextLine();
8 |
9 | System.out.printf("%s's length is %d, its first letter is %c", str, str.length(), str.charAt(0));
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Ch04/src/Quiz_4_25.java:
--------------------------------------------------------------------------------
1 | public class Quiz_4_25 {
2 | public void showNum(){
3 | char[]letter = new char[3];
4 | for (int i = 0; i < 3; i++){
5 | letter[i] = (char)(65 + Math.random() * 26 + 1);
6 | }
7 | int num = (int)(1000 + Math.random() * 8999 + 1);
8 | System.out.print("The result is " + letter[0] + letter[1] + letter[2] + num);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Ch11/src/ClassB.java:
--------------------------------------------------------------------------------
1 | /**
2 | * @author callmezh
3 | * 动态绑定
4 | */
5 | public class ClassB extends ClassA {
6 | /**
7 | * ClassB 首先隐式调用 父类无参构造方法,在父类构造方法中调用重写后的setI方法
8 | * 动态绑定,先从本类中调用方法
9 | */
10 | public ClassB(){
11 | System.out.println("I from B is " + i) ;
12 | }
13 |
14 | @Override
15 | public void setI(int i){
16 | this.i = 3 * i;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Ch07/src/Quiz_7_7.java:
--------------------------------------------------------------------------------
1 | import java.util.Arrays;
2 |
3 | public class Quiz_7_7 {
4 | void printRandomNum(){
5 | int[] count = new int[10];
6 | for (int i = 0; i < 100; i++){
7 | count[createNum()]++;
8 | }
9 |
10 | System.out.print(Arrays.toString(count));
11 | }
12 |
13 | static int createNum(){
14 | return (int)(Math.random() * 10);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Ch12/src/TestFileClass.java:
--------------------------------------------------------------------------------
1 | import java.io.File;
2 |
3 | public class TestFileClass {
4 | static void printResult(){
5 | File file = new File("C:\\Users\\callmezh\\Desktop\\ae.jpg");
6 | System.out.println("Does it exits? " + file.exists());
7 | System.out.printf("The file has %d bytes\n", file.length());
8 | System.out.println("Absolute path is " + file.getAbsolutePath());
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Ch06/src/TestMethod.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | class TestMethod {
4 | void testMethod() {
5 | System.out.print("Java is the best language in the world!");
6 | Scanner inpiut = new Scanner(System.in);
7 | int i = inpiut.nextInt();
8 | if (i >= 10) {
9 | System.out.print("no");
10 | if (i >= 100){
11 | return;
12 | }
13 | } }}
14 |
15 |
--------------------------------------------------------------------------------
/Ch05/src/com/company/Quiz_5_46.java:
--------------------------------------------------------------------------------
1 | package com.company;
2 |
3 | import java.util.Scanner;
4 |
5 | public class Quiz_5_46 {
6 | void invertedString(){
7 | Scanner input = new Scanner(System.in);
8 | System.out.print("Enter a string: ");
9 | String str = input.nextLine();
10 |
11 | for (int i = str.length() - 1; i >= 0; i--){
12 | System.out.print(str.charAt(i));
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Ch07/src/InputInteger.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | public class InputInteger {
4 | static int[] getArray(int num){
5 | Scanner input = new Scanner(System.in);
6 | System.out.printf("Enter %d integer: ", num);
7 | int[] array = new int[num];
8 |
9 | for (int i = 0; i < array.length; i++){
10 | array[i] = input.nextInt();
11 | }
12 |
13 | return array;
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Ch01/src/quiz_1_6.java:
--------------------------------------------------------------------------------
1 | public class quiz_1_6 {
2 | public static int sumNum(int n) {
3 | /**
4 | * 利用sum保存中间结果
5 | */
6 | // int sum = 0;
7 | // for (int i = 0; i < n + 1; i++){
8 | // sum +=i;
9 | // }
10 | // return sum;
11 | /**
12 | * 递归实现
13 | */
14 | if (n == 0){
15 | return 0;
16 | }else
17 | return sumNum(n - 1) + n;
18 | }
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/Ch07/src/VarArgsDemo.java:
--------------------------------------------------------------------------------
1 | public class VarArgsDemo {
2 | void printResult(){
3 | int[] num = printList(1,3,3);
4 | for (int i = 0; i <= num.length - 1; i++){
5 | System.out.print(num[i]);
6 | }
7 |
8 | }
9 |
10 | static int[] printList(int... num){
11 |
12 | // for (int i = 0; i <= 10; i++){
13 | // num[i] = (int)(Math.random() * 10);
14 | // }
15 |
16 | return num;
17 | }
18 |
19 | }
--------------------------------------------------------------------------------
/Ch07/src/ArrayCopyMethod.java:
--------------------------------------------------------------------------------
1 | public class ArrayCopyMethod {
2 | void printResult(){
3 | arrayCopySystemMothod();
4 | }
5 |
6 | static void arrayCopySystemMothod(){
7 | int [] srcArray = {1, 2, 3, 4 , 5, 6};
8 | int [] targetArray = new int[6];
9 |
10 | System.arraycopy(srcArray, 0, targetArray, 0, 3);
11 | for (int i = 0; i < 6; i++){
12 | System.out.print(targetArray[i]);
13 | }
14 |
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Ch01/Ch01.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/Ch02/Ch02.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/Ch02/src/SalesTax.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | public class SalesTax {
4 | public static void practiceTax() {
5 | Scanner input = new Scanner(System.in);
6 | System.out.print("请输入营业额(¥):");
7 | double amountOfsales = input.nextDouble();
8 | double tax;
9 | final double RATE_OF_TAX = 0.006;
10 | tax = (int)(amountOfsales * RATE_OF_TAX * 1000) / 1000.0;
11 | System.out.print("所缴营业税为:" + tax + "¥");
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Ch03/Ch03.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/Ch04/Ch04.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/Ch05/Ch05.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/Ch05/src/com/company/Cost.java:
--------------------------------------------------------------------------------
1 | package com.company;
2 |
3 | public class Cost {
4 | double price;
5 | double amount;
6 |
7 | public void setPrice(double price) {
8 | this.price = price;
9 | }
10 |
11 | public void setAmount(double amount) {
12 | this.amount = amount;
13 | }
14 |
15 | public double getPrice() {
16 | return price;
17 | }
18 |
19 | public double getAmount() {
20 | return amount;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Ch06/Ch06.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/Ch07/Ch07.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/Ch08/Ch08.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/Ch09/Ch09.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/Ch09/src/Quiz_9_4_Random.java:
--------------------------------------------------------------------------------
1 | import java.util.Random;
2 |
3 | /**
4 | * @author callmezh
5 | * Random类
6 | */
7 | public class Quiz_9_4_Random {
8 | /**
9 | * 产生范围在0 - 100 的 50 个随机数
10 | */
11 | void printRandom(){
12 | Random myRandom = new Random();
13 | myRandom.setSeed(1000);
14 | int count = 50;
15 | for (int i = 0; i <= count; i++){
16 | System.out.println(myRandom.nextInt(100));
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Ch10/Ch10.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/Ch11/Ch11.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/Ch12/Ch12.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/Ch05/src/com/company/Quiz_5_23.java:
--------------------------------------------------------------------------------
1 | package com.company;
2 |
3 | import java.util.Scanner;
4 |
5 | public class Quiz_5_23 {
6 | public void sum(){
7 | Scanner input = new Scanner(System.in);
8 | System.out.print("Enter the number: ");
9 | double num = input.nextDouble();
10 | double sum = 0;
11 | for (; num >= 1; num -= 1){
12 | sum += (1 / num);
13 | }
14 | System.out.printf("The sum is %f", sum);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Ch03/src/Quiz_3_14.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | public class Quiz_3_14 {
4 | public static void guessCoin(){
5 | int coin = 0;
6 | if (Math.random() >=0.5){
7 | coin = 1;
8 | }
9 | Scanner input = new Scanner(System.in);
10 | System.out.print("请输入数字 0 或 1 :");
11 | if (input.nextInt() == coin){
12 | System.out.print("恭喜你猜对了!");
13 | }else
14 | System.out.print("猜错了,不要灰心,再试一次!");
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Ch05/src/com/company/Quiz_5_37.java:
--------------------------------------------------------------------------------
1 | package com.company;
2 |
3 | import java.util.Scanner;
4 |
5 | class Quiz_5_37 {
6 | void D2B(){
7 | Scanner input = new Scanner(System.in);
8 | System.out.print("Enter a d number: ");
9 | int dNum = input.nextInt();
10 | String bNum = "";
11 | do {
12 | bNum = dNum % 2 + bNum;
13 | dNum /= 2;
14 | }while (dNum != 0);
15 | System.out.printf("The result is %s", bNum);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Ch11/src/Quiz_11_2_Faculty.java:
--------------------------------------------------------------------------------
1 | public class Quiz_11_2_Faculty extends Quiz_11_2_Employer{
2 | private static int LECTURER = 1;
3 | private static int ASSISTANT_PROFESSOR = 2;
4 | private static int ASSOCIATE_PROFESSOR = 3;
5 | private static int PROFESSOR = 4;
6 |
7 | private double workTime = 8;
8 | private int rank;
9 |
10 | Quiz_11_2_Faculty(){
11 |
12 | }
13 |
14 | @Override
15 | public String toString() {
16 | return "Faculty";
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Ch05/src/com/company/Quiz_5_24.java:
--------------------------------------------------------------------------------
1 | package com.company;
2 |
3 | import java.util.Scanner;
4 |
5 | public class Quiz_5_24 {
6 | public void computeSum(){
7 | double sum = 0;
8 | Scanner input = new Scanner(System.in);
9 | System.out.print("Enter a number: ");
10 | int num = input.nextInt();
11 | for (int i = 3; i <= num; i += 2){
12 | sum += (double)(i - 2) / i;
13 | }
14 | System.out.printf("The sum is %.8f", sum);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Ch05/src/com/company/Quiz_5_35.java:
--------------------------------------------------------------------------------
1 | package com.company;
2 |
3 | import java.util.Scanner;
4 |
5 | class Quiz_5_35 {
6 | void sum(){
7 | double sum = 0;
8 | Scanner input = new Scanner(System.in);
9 | System.out.print("Enter the number: ");
10 | int n = input.nextInt();
11 | for (int i = 1; i <= n; i++){
12 | sum += (double) 1 / (Math.sqrt(i) + Math.sqrt(i + 1));
13 | }
14 | System.out.printf("The result is %f", sum);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Ch11/src/Quiz_11_2_Person.java:
--------------------------------------------------------------------------------
1 | /**
2 | * @author callmezh
3 | * person类,定义基本属性
4 | */
5 | public class Quiz_11_2_Person {
6 | String name;
7 | String address;
8 | String phoneNum;
9 | String emailAddress;
10 |
11 | Quiz_11_2_Person(){
12 |
13 | }
14 |
15 | @Override
16 | public String toString(){
17 | return "Person's name: " + name + " address: " + address + " phoneNum: "
18 | + phoneNum + " email address: " + emailAddress;
19 | }
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/Ch05/src/com/company/Quiz_5_38.java:
--------------------------------------------------------------------------------
1 | package com.company;
2 |
3 | import java.util.Scanner;
4 |
5 | public class Quiz_5_38 {
6 | void D2E(){
7 | Scanner input = new Scanner(System.in);
8 | System.out.print("Enter a d number: ");
9 | int dNum = input.nextInt();
10 | String bNum = "";
11 | do {
12 | bNum = dNum % 8 + bNum;
13 | dNum /= 8;
14 | }while (dNum != 0);
15 | System.out.printf("The result is %s", bNum);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Ch05/src/com/company/Quiz_5_8_Student.java:
--------------------------------------------------------------------------------
1 | package com.company;
2 |
3 | public class Quiz_5_8_Student {
4 | private String name;
5 | private double grade;
6 |
7 | public void setName(String name) {
8 | this.name = name;
9 | }
10 |
11 | public void setGrade(double grade) {
12 | this.grade = grade;
13 | }
14 |
15 | public String getName() {
16 | return name;
17 | }
18 |
19 | public double getGrade() {
20 | return grade;
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/Ch04/src/Quiz_4_1.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | public class Quiz_4_1 {
4 | public void computeCover(){
5 | Scanner input = new Scanner(System.in);
6 | System.out.print("Enter the length from the center to a vertex: ");
7 | double length = input.nextDouble();
8 |
9 | double s = 2 * length * Math.sin(Math.PI / 5);
10 | double cover = 5 * s * s / (4 * Math.tan(Math.PI /5));
11 | System.out.printf("The area of the pentagon is %2.2f", cover);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Ch11/src/Quiz_11_3_MaxOfArraylist.java:
--------------------------------------------------------------------------------
1 | import java.util.ArrayList;
2 | import java.util.Random;
3 |
4 | public class Quiz_11_3_MaxOfArraylist {
5 | public static void printResult(){
6 | Random random = new Random();
7 | ArrayList list = new ArrayList<>();
8 | int sizeOfList = 10;
9 | for (int i = 0; i < sizeOfList; i++){
10 | list.add(i, random.nextInt());
11 | }
12 | System.out.print(java.util.Collections.max(list));
13 |
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Ch05/src/com/company/Quiz_5_25.java:
--------------------------------------------------------------------------------
1 | package com.company;
2 |
3 | import java.util.Scanner;
4 |
5 | public class Quiz_5_25 {
6 | public void computePI(){
7 | double PI = 0;
8 | Scanner input = new Scanner(System.in);
9 | System.out.print("Enter a number: ");
10 | int num = input.nextInt();
11 | for (; num > 0; num -= 1){
12 | PI += 4 * Math.pow(-1, num + 1) / (double)(2 * num - 1);
13 | }
14 | System.out.printf("PI is %.20f", PI);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Ch01/src/quiz_1_11.java:
--------------------------------------------------------------------------------
1 | import java.text.DecimalFormat;
2 |
3 | public class quiz_1_11 {
4 | public static String PeopleNum(int year){
5 | final int STATE_PEOPLE_NUM = 312032486;
6 | final int SECOND_OF_YEAR = 365 * 24 * 60 * 60;
7 | int peopleNum = STATE_PEOPLE_NUM + year * SECOND_OF_YEAR / 5 + year * SECOND_OF_YEAR / 45;
8 | DecimalFormat addDecFormat = new DecimalFormat();
9 | addDecFormat.applyPattern("#,###");
10 | return addDecFormat.format(peopleNum);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Ch01/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/Ch02/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/Ch03/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/Ch04/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/Ch05/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/Ch06/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/Ch06/src/TestRandomCharacter.java:
--------------------------------------------------------------------------------
1 | public class TestRandomCharacter {
2 | void test() {
3 | final int NUM_OF_CHARS = 175;
4 | final int CHARS_PER_LINE = 5;
5 |
6 | for (int i = 1; i <= NUM_OF_CHARS; i++) {
7 | char ch = RandomCharacter.getRandomUpperCaseLetter();
8 | if (i % CHARS_PER_LINE == 0) {
9 | System.out.println(ch);
10 | } else
11 | System.out.print(ch);
12 | }
13 | }
14 |
15 | }
--------------------------------------------------------------------------------
/Ch07/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/Ch07/src/ReturnArrary.java:
--------------------------------------------------------------------------------
1 | public class ReturnArrary {
2 | void printResult(){
3 | int[] list = {1,2,2,3,5};
4 |
5 | for (int e: reverse(list)) {
6 | System.out.print(e);
7 | }
8 | }
9 |
10 | //翻转数组元素
11 | static int[] reverse(int[] list){
12 | int[] result = new int[list.length];
13 |
14 | for (int i = 0, j = result.length - 1; i <= list.length - 1; i++, j--){
15 | result[j] = list[i];
16 | }
17 |
18 | return result;
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Ch08/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/Ch09/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/Ch10/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/Ch11/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/Ch12/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/Ch03/src/Quiz_3_8.java:
--------------------------------------------------------------------------------
1 | import java.lang.reflect.Array;
2 | import java.util.Arrays;
3 | import java.util.Scanner;
4 |
5 | public class Quiz_3_8 {
6 | public static void sort(){
7 | Scanner input = new Scanner(System.in);
8 | double[] num = new double[3];
9 | for (int i = 0; i < 3; i++) {
10 | System.out.print("请输入第" + (i + 1) + "个整数:");
11 | num[i] = input.nextDouble();
12 | }
13 | Arrays.sort(num);
14 | for (int i = 0; i < 3; i++){
15 | System.out.println(num[i]);
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/Ch06/src/Quiz_6_29.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | public class Quiz_6_29 {
4 | void printDoublePrime(){
5 | Scanner input = new Scanner(System.in);
6 | System.out.print("Enter a number:");
7 | int num = input.nextInt();
8 |
9 | int i = 2;
10 | while (i <= num){
11 | if(PrimeNumMethod.isPrimeNum(i) && PrimeNumMethod.isPrimeNum(i + 2)){
12 | System.out.printf("(%d, %d)\n", i, i + 2);
13 | }
14 | i++;
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Ch04/src/Quiz_4_8.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | public class Quiz_4_8 {
4 | public void showASCII(){
5 | Scanner input = new Scanner(System.in);
6 | System.out.print("Enter an ASCII code: ");
7 | byte code = input.nextByte();
8 | if (code >=0 && code <= 127){
9 | char ch = (char)code;
10 | System.out.printf("The character for ASCII code %d is %c", code, ch);
11 | }else
12 | System.out.print("Please enter a ASCII code between 0 to 127!");
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Ch12/src/InvalidRadiusException.java:
--------------------------------------------------------------------------------
1 | /**
2 | * @author callmezh
3 | */
4 | public class InvalidRadiusException extends Exception{
5 | private double radius;
6 |
7 | /**
8 | * Construct an exception
9 | */
10 | public InvalidRadiusException(double radius){
11 | //调用Exception父类有参构造方法
12 | super("Invalid radius" + radius);
13 | this.radius = radius;
14 | }
15 |
16 | /**
17 | * Return the radius
18 | */
19 | public double getRadius(){
20 | return radius;
21 | }
22 | }
--------------------------------------------------------------------------------
/Ch11/src/Quiz_11_13_Remove.java:
--------------------------------------------------------------------------------
1 | import java.util.ArrayList;
2 |
3 | public class Quiz_11_13_Remove {
4 | public static void removeDuplicate(ArrayList list){
5 | for (int i = 0; i < list.size(); i++){
6 | for (int j = i + 1; j < list.size(); j++){
7 | if (list.get(i).equals(list.get(j))){
8 | list.remove(i);
9 | //下一次继续从i开始排查
10 | i--;
11 | break;
12 | }
13 | }
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Ch05/src/com/company/Quiz_5_48.java:
--------------------------------------------------------------------------------
1 | package com.company;
2 |
3 | import java.util.Scanner;
4 |
5 | public class Quiz_5_48 {
6 | void showOddChart(){
7 | Scanner input = new Scanner(System.in);
8 | System.out.print("Enter a string: ");
9 | String str = input.next();
10 |
11 | for (int i = 0; i <= str.length() - 1; i++){
12 | if ((i + 1) % 2 != 0){
13 | System.out.printf("%s", str.charAt(i));
14 | }
15 | }
16 | }
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/Ch06/src/Quiz_6_32.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | public class Quiz_6_32 {
4 | void printResult(){
5 | Scanner input = new Scanner(System.in);
6 | System.out.print("Enter the times: ");
7 | int n = input.nextInt();
8 | int countWin = 0;
9 | for (int i = 1; i <= n; i++){
10 | if (Quiz_6_30.printCrapsResult()){
11 | countWin++;
12 | }
13 | }
14 |
15 | System.out.printf("Win times are %d, lose times are %d", countWin, n - countWin);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Ch12/src/Quiz_12_4_IllArgumentException.java:
--------------------------------------------------------------------------------
1 | /**
2 | * @author callmezh
3 | * 自定义异常类
4 | * 仅仅只对构造方法进行了实现,显示调用父类构造方法对子类构造方法进行扩展
5 | */
6 | public class Quiz_12_4_IllArgumentException extends Exception {
7 | // double amount;
8 | // double rate;
9 |
10 | Quiz_12_4_IllArgumentException(){
11 |
12 | }
13 |
14 | Quiz_12_4_IllArgumentException(double amount, double rate){
15 | super("Invalid amount: " + amount + "\nInvalid rate: " + rate);
16 | // this.amount = amount;
17 | // this.rate = rate;
18 | }
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/Ch05/src/com/company/Quiz_5_44.java:
--------------------------------------------------------------------------------
1 | package com.company;
2 |
3 | import java.util.Scanner;
4 |
5 | public class Quiz_5_44 {
6 | void show0x(){
7 | Scanner input = new Scanner(System.in);
8 | System.out.print("Enter an integer: ");
9 | int value = input.nextInt();
10 |
11 | System.out.print("The 16 bits are ");
12 | int mask = 1;
13 | for (int i = 15; i >= 0; i--) {
14 | int temp = value >> i;
15 | int bit = temp & mask;
16 | System.out.print(bit);
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Ch11/src/Quiz_11_2_Student.java:
--------------------------------------------------------------------------------
1 | /**
2 | * @author callmezh
3 | * student类
4 | */
5 | public class Quiz_11_2_Student extends Quiz_11_2_Person {
6 | public static int FRESHMAN = 1;
7 | public static int SOPHOMORE = 2;
8 | public static int SENIOR = 3;
9 |
10 | private int state;
11 |
12 | Quiz_11_2_Student(){
13 |
14 | }
15 |
16 | Quiz_11_2_Student(int state){
17 | this.state = state;
18 | }
19 |
20 | @Override
21 | public String toString(){
22 | return "Student's name: " + name + " state " + state;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Ch05/src/com/company/SentinelVaiue.java:
--------------------------------------------------------------------------------
1 | package com.company;
2 |
3 | import java.util.Scanner;
4 |
5 | public class SentinelVaiue {
6 | public void sentinelValue(){
7 | Scanner input = new Scanner(System.in);
8 | System.out.print("Enter a number: ");
9 | int num = input.nextInt();
10 |
11 | int sum = 0;
12 | while (num != 0){
13 | sum += num;
14 | System.out.print("Enter a number: ");
15 | num = input.nextInt();
16 | }
17 | System.out.printf("The addition is %d", sum);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Ch09/src/Quiz_9_3_Date.java:
--------------------------------------------------------------------------------
1 | import java.util.Date;
2 |
3 | /**
4 | * @author callmezh
5 | * 用户自定义时间
6 | */
7 | public class Quiz_9_3_Date {
8 | /**
9 | * 调用date.setDate(time)方法设定时间
10 | */
11 | void printDate(){
12 | Date date = new Date();
13 |
14 | int count = 1;
15 | long time = 10000;
16 | final int countBound = 8;
17 | while (count <= countBound){
18 | date.setTime(time);
19 | System.out.println(date.toString());
20 | count++;
21 | time *= 10;
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Ch03/src/AdditionQuiz.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | public class AdditionQuiz {
4 | public static void addition(){
5 | double num1 = System.currentTimeMillis() % 2;
6 | double num2 = System.currentTimeMillis() % 7;
7 | System.out.print(num1 + "+" + num2 + " = ");
8 | Scanner input = new Scanner(System.in);
9 | double result = input.nextDouble();
10 | if(num1 + num2 == result){
11 | System.out.print ("The answer is correct");
12 | }else
13 | System.out.print ("The answer is incorrect");
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Ch11/src/Quiz_11_8_Account.java:
--------------------------------------------------------------------------------
1 | public class Quiz_11_8_Account {
2 | double rate;
3 | String name;
4 | int id;
5 | double cost;
6 | double store;
7 | Quiz_11_Transaction transaction;
8 |
9 | Quiz_11_8_Account(){
10 |
11 | }
12 |
13 | Quiz_11_8_Account(String name, int id, double cost, double store, double rate, Quiz_11_Transaction transaction){
14 | this.name = name;
15 | this.cost = cost;
16 | this.id = id;
17 | this.store = store;
18 | this.rate = rate;
19 | this.transaction = transaction;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Ch04/src/Quiz_4_5.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | import static java.lang.StrictMath.tan;
4 |
5 | public class Quiz_4_5 {
6 | public void computeCover(){
7 | Scanner input = new Scanner(System.in);
8 | System.out.print("Enter the number of sides: ");
9 | int numOfSide = input.nextInt();
10 | System.out.print("Enter the side: ");
11 | double side = input.nextDouble();
12 |
13 | double cover = numOfSide * side * side / (4 * tan(Math.PI / numOfSide));
14 | System.out.printf("The area of the polygon is %2.4f", cover);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Ch04/src/Quiz_4_9.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | public class Quiz_4_9 {
4 | public void showUnicode(){
5 | Scanner input = new Scanner(System.in);
6 | System.out.print("Enter a character: ");
7 | String str = input.nextLine();
8 |
9 | if (str.length() != 1){
10 | System.out.print("You must enter exactly one character1");
11 | System.exit(1);
12 | }
13 |
14 | char ch = str.charAt(0);
15 | int unicode = ch;
16 | System.out.printf("The Unicode for the character %c is %d", ch, unicode);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Ch10/src/LargeFactorial.java:
--------------------------------------------------------------------------------
1 | import java.math.BigInteger;
2 |
3 | /**
4 | * @author callmezh
5 | * 阶乘
6 | */
7 | class LargeFactorial {
8 | void printResult(){
9 | System.out.println("50! = " + factorial(50));
10 | }
11 |
12 | /**
13 | * for循环实现阶乘
14 | * @param num
15 | * @return
16 | */
17 | private static BigInteger factorial(int num){
18 | BigInteger result = BigInteger.ONE;
19 | for (int i = 1; i < num; i++){
20 | result = result.multiply(new BigInteger(i + ""));
21 | }
22 | return result;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Ch05/src/com/company/Quiz_5_16.java:
--------------------------------------------------------------------------------
1 | package com.company;
2 |
3 | import java.util.Scanner;
4 |
5 | public class Quiz_5_16 {
6 | public void computeFactor(){
7 | Scanner input = new Scanner(System.in);
8 | System.out.printf("Enter a integer: ");
9 | int num = input.nextInt();
10 |
11 | System.out.printf("The %d's factors are ", num);
12 | for (int k = 2; k <= num; ){
13 | if (num % k == 0){
14 | num /= k;
15 | System.out.printf(" %d", k);
16 | }else
17 | k++;
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Ch07/src/Quiz_7_34.java:
--------------------------------------------------------------------------------
1 | import java.util.Arrays;
2 | import java.util.Scanner;
3 |
4 | public class Quiz_7_34 {
5 | void printSortString(){
6 | Scanner input = new Scanner(System.in);
7 | System.out.print("Enter a string: ");
8 | String str = input.nextLine();
9 | String[] strCharArray = new String[str.length()];
10 | for (int i =0; i < str.length(); i++){
11 | strCharArray[i] = String.valueOf(str.charAt(i));
12 | }
13 |
14 | Arrays.sort(strCharArray);
15 | System.out.print(Arrays.toString(strCharArray));
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Ch05/src/com/company/Quiz_5_26.java:
--------------------------------------------------------------------------------
1 | package com.company;
2 |
3 | import java.util.Scanner;
4 |
5 | public class Quiz_5_26 {
6 | public void computeE(){
7 | Scanner input = new Scanner(System.in);
8 | System.out.print("Enter the number: ");
9 | int num = input.nextInt();
10 | double sum = 0;
11 | for (; num > 0; num -= 1){
12 | double n = 1;
13 | for (int i = num; i > 0; i -= 1){
14 | n *= i;
15 | }
16 | sum += 1 / n;
17 | }
18 | System.out.printf("The sum is %f", sum);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Ch05/src/com/company/Quiz_5_50.java:
--------------------------------------------------------------------------------
1 | package com.company;
2 |
3 | import java.util.Scanner;
4 |
5 | public class Quiz_5_50 {
6 | void capitalCount(){
7 | Scanner input = new Scanner(System.in);
8 | System.out.print("Enter a string: ");
9 | String str = input.nextLine();
10 | int count = 0;
11 |
12 | for (int i = 0; i <= str.length() - 1; i++){
13 | if (str.charAt(i) >= 'A' && str.charAt(i) <= 'Z'){
14 | count++;
15 | }
16 | }
17 | System.out.printf("The number of uppercase letters is %d", count);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Ch05/src/com/company/Quiz_5_10.java:
--------------------------------------------------------------------------------
1 | package com.company;
2 |
3 | class Quiz_5_10 {
4 | void findNum(){
5 | int count = 0;
6 | for (int k = 100; k <= 1000; k++){
7 | boolean isGoodNum = false;
8 | if ((k % 5 == 0) && (k % 6 == 0)){
9 | isGoodNum = true;
10 | }
11 | if (isGoodNum){
12 | count++;
13 | if (count % 5 == 0){
14 | System.out.printf("%5d\n", k);
15 | }else
16 | System.out.printf("%5d", k);
17 | }
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Ch06/src/Quiz_5_2.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | public class Quiz_5_2 {
4 | void sum(){
5 | Scanner input = new Scanner(System.in);
6 | System.out.print("Enter an integer: ");
7 | int num = input.nextInt();
8 |
9 | System.out.printf("The sum is %d", sumDigits(num));
10 | }
11 |
12 | private static int sumDigits(int n){
13 | int sum = 0;
14 | int temp = n;
15 | while (temp != 0){
16 | int remainder = temp % 10;
17 | sum += remainder;
18 | temp /= 10;
19 | }
20 | return sum;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Ch04/src/Quiz_4_11.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | public class Quiz_4_11 {
4 | public void showHex(){
5 | Scanner input = new Scanner(System.in);
6 | System.out.print("Enter a decimal value (0 to 15): ");
7 | byte dec = input.nextByte();
8 |
9 | if (dec >=0 && dec <= 9){
10 | System.out.print("The hex value is " + dec);
11 | }else if (dec >=10 && dec <= 15){
12 | char ch = (char)(55 + dec);
13 | System.out.print("The hex value is " + ch);
14 | }else
15 | System.out.print( dec + " is an invalid input!");
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Ch06/src/Quiz_6_28.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | public class Quiz_6_28 {
4 | void printMSPrimeNum(){
5 | Scanner input = new Scanner(System.in);
6 | System.out.print("Enter a number: ");
7 | int num = input.nextInt();
8 |
9 | System.out.print("P 2^P - 1\n");
10 | int i = 2;
11 | //大于等于2,因为这样可以直接排除1的可能性
12 | while (i <= num){
13 | if (PrimeNumMethod.isPrimeNum(i) && Math.sqrt(i + 1) % 1 == 0){
14 | System.out.printf("%.0f %4d\n", Math.sqrt(i + 1), i);
15 | }
16 | i++;
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Ch05/src/com/company/Quiz_5_33.java:
--------------------------------------------------------------------------------
1 | package com.company;
2 |
3 | public class Quiz_5_33 {
4 | public void findNum(){
5 | int resultNum = 6;
6 | System.out.print("result number is ");
7 | while (resultNum <= 10000){
8 | int temp = 1;
9 | for (int i = 2; i <= resultNum / 2; i++){
10 | if (resultNum % i == 0){
11 | temp += i;
12 | }
13 | }
14 | if (temp == resultNum){
15 | System.out.printf("%6d", resultNum);
16 | }
17 | resultNum++;
18 | }
19 |
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Ch03/src/Quiz_3_23.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | public class Quiz_3_23 {
4 | public static void checkPoint(){
5 | Scanner input = new Scanner(System.in);
6 | System.out.print("Enter a point with two coordinates: ");
7 | double point_x = input.nextDouble();
8 | double point_y = input.nextDouble();
9 | if (Math.abs(point_x) > 5 || Math.abs(point_y) > 2.5){
10 | System.out.print("Point (" + point_x + "," + point_y + ") is not in the rectangle");
11 | }else
12 | System.out.print("Point (" + point_x + "," + point_y + ") is in the rectangle");
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Ch07/src/Quiz_7_23.java:
--------------------------------------------------------------------------------
1 | public class Quiz_7_23 {
2 | void PrintOpen(){
3 | boolean[] isOpen = new boolean[100];
4 | openCloseDoor(isOpen);
5 | for (int i = 0; i < isOpen.length; i++){
6 | if (isOpen[i]){
7 | System.out.print(i + 1 + " is open\n");
8 | }
9 | }
10 | }
11 |
12 | static void openCloseDoor(boolean[] isOpen){
13 | for (int i = 1; i <= 100; i++){
14 | for (int j = i - 1; j < isOpen.length; j = j + (i - 1)){
15 | isOpen[j] = !isOpen[j];
16 | j++;
17 | }
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Ch03/src/Quiz_3_19.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | public class Quiz_3_19 {
4 | public static void computeSingel(){
5 | Scanner input = new Scanner(System.in);
6 | System.out.print("请输入三角形的三条边:");
7 | double line1 = input.nextDouble();
8 | double line2 = input.nextDouble();
9 | double line3 = input.nextDouble();
10 | if (line1 + line2 <= line3
11 | || line1 + line3 <= line2
12 | || line2 + line3 <= line1){
13 | System.out.print("所输入的三条边无法构成三角形!");
14 | }else
15 | System.out.print("周长为:" +(line1 + line2 + line3));
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Ch06/src/Quiz_6_1.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | public class Quiz_6_1 {
4 | void printPentagonalNum(){
5 | Scanner input = new Scanner(System.in);
6 | System.out.print("Enter the number of pentagonal: ");
7 | int num = input.nextInt();
8 |
9 | for (int i = 1; i <= num; i++){
10 | if (i % 10 == 0){
11 | System.out.printf("%10d\n", getPentagonalNum(i));
12 | }else
13 | System.out.printf("%10d", getPentagonalNum(i));
14 | }
15 | }
16 |
17 | private int getPentagonalNum(int n){
18 | return n * (3 * n - 1) / 2;
19 | }
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/Ch06/src/Quiz_6_17.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | class Quiz_6_17 {
4 | void printMatrix(){
5 | Scanner input = new Scanner(System.in);
6 | System.out.print("Enter a number: ");
7 | int num = input.nextInt();
8 |
9 | for (int row = 1; row <= num; row++){
10 | for (int k = 1; k <= num; k++){
11 | double randomNum = Math.rint(Math.random());
12 | if (k == num){
13 | System.out.printf("%3.0f\n", randomNum);
14 | }else
15 | System.out.printf("%3.0f", randomNum);
16 | }
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Ch07/src/BinarySearch.java:
--------------------------------------------------------------------------------
1 | public class BinarySearch {
2 | void printSeachResult(){
3 |
4 | }
5 |
6 | //二分查找
7 | static int binarySearch(int[] num, int key){
8 | int low = 0;
9 | int high = num.length - 1;
10 |
11 | while (high >= low){
12 | int mid = (low + high) / 2;
13 |
14 | if (key < num[mid]){
15 | high = mid - 1;
16 | }else if (key == num[mid]){
17 | return mid;
18 | }else if (key > num[mid]){
19 | low = mid + 1;
20 | }
21 | }
22 | return -low - 1;//low 是key可以插入的位置
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Ch08/src/Quiz_8_2.java:
--------------------------------------------------------------------------------
1 | /**
2 | * @author callmezh
3 | * 求 N X N 矩阵主对角线元素的和
4 | */
5 | public class Quiz_8_2 {
6 | void printResult(){
7 | int [][] array = Array.createArray(4);
8 | Array.printArray(array);
9 | System.out.printf("The sum of major diagonal is %d", sumMajorDiagonal(array));
10 | }
11 |
12 | /**
13 | * @param array 二维数组
14 | * @return sum 对角元素和
15 | */
16 | private static int sumMajorDiagonal(int[][] array){
17 | int sum = 0;
18 | for (int row = 0; row < array.length; row++){
19 | sum += array[row][row];
20 | }
21 | return sum;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Ch02/src/Quiz_2_6.java:
--------------------------------------------------------------------------------
1 | import static java.lang.Math.random;
2 |
3 | public class Quiz_2_6 {
4 | public static void sumNum(){
5 | int oldDum = (int) (random() * 100000);
6 | int newNum = oldDum;
7 | int tenThured = newNum / 10000;
8 | newNum %= 10000;
9 | int thured = newNum / 1000;
10 | newNum %= 1000;
11 | int hundred = newNum / 100;
12 | newNum %= 100;
13 | int ten = newNum / 10;
14 | int singel = newNum % 10;
15 |
16 | System.out.println("随机得到的数字为:" + oldDum);
17 | System.out.println("各数位相加得:" + ( tenThured + thured + hundred + ten + singel));
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Ch02/src/Quiz_2_17.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | import static java.lang.Math.pow;
4 |
5 | public class Quiz_2_17 {
6 | public static void computeTwc(){
7 | Scanner input = new Scanner(System.in);
8 | System.out.print("请输入温度(摄氏度,范围为-58 — 41):");
9 | double temperature = input.nextDouble();
10 | System.out.print("请输入风速(km/h):");
11 | double speedOfWind = input.nextDouble();
12 | double twc = 35.74 + 0.6215 * temperature - 35.75 * pow(speedOfWind, 0.16) + 0.4275 * temperature * pow(speedOfWind ,0.16);
13 | twc = (int)(twc * 100) / 100.0;
14 | System.out.print("风寒温度为:" + twc);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Ch06/src/RandomCharacter.java:
--------------------------------------------------------------------------------
1 | public class RandomCharacter {
2 | private static char getRandomChar(char ch1, char ch2){
3 | return (char)(ch1 + Math.random() * (ch2 - ch1) + 1);
4 | }
5 |
6 | public static char getRandomLowwerCaseLetter(){
7 | return getRandomChar('a', 'z');
8 | }
9 |
10 | public static char getRandomUpperCaseLetter(){
11 | return getRandomChar('A', 'Z');
12 | }
13 |
14 | public static char getRandomDigitCharacter(){
15 | return getRandomChar('0', '9');
16 | }
17 |
18 | public static char getRandomCharacter(){
19 | return getRandomChar('\u0000', '\uFFFF');
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Ch09/src/Quiz_9_6_StopWatch.java:
--------------------------------------------------------------------------------
1 | public class Quiz_9_6_StopWatch {
2 | private long startTime;
3 | private long endTime;
4 |
5 | Quiz_9_6_StopWatch(){
6 | startTime = System.currentTimeMillis();
7 | }
8 |
9 | void startTime(){
10 | startTime = System.currentTimeMillis();
11 | }
12 |
13 | void endTime(){
14 | endTime = System.currentTimeMillis();
15 | }
16 |
17 | long getElapsedTime(){
18 | return endTime - startTime;
19 | }
20 |
21 | public long getStartTime() {
22 | return startTime;
23 | }
24 |
25 | public long getEndTime() {
26 | return endTime;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Ch01/src/quiz_1_10.java:
--------------------------------------------------------------------------------
1 | public class quiz_1_10 {
2 | public static double practiceSpeedPerHour(String time, double length){
3 | double speed;
4 | String[] hour_min_sec = time.split(":|:"); //字符串分割符后面不能加空格,加了空格表示分割依据中包含空格
5 | double[] times = new double[3];
6 | // for (String element :hour_min_sec) {
7 | // double times = Double.parseDouble(element);
8 | // System.out.println(times);
9 | // }
10 | for (int i = 0; i < 3; i++){
11 | times[i] = Double.parseDouble(hour_min_sec[i]);
12 | }
13 | speed = length / (times[0] + times[1]/60 + times[2]/3600);
14 | return speed;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Ch07/src/Quiz_7_2.java:
--------------------------------------------------------------------------------
1 |
2 | import java.util.Arrays;
3 | import java.util.Scanner;
4 |
5 | public class Quiz_7_2 {
6 | void rever(){
7 | Scanner input = new Scanner(System.in);
8 | int[] num = new int[4];
9 | for (int i = 0; i < 4; i ++){
10 | System.out.printf("Enter the %d number: ", i);
11 | num[i] = input.nextInt();
12 | }
13 |
14 | int[] reverNum = new int[4];
15 | for (int i = 3, j = 0; i >= 0 && j < 4; i--, j++){
16 | reverNum[j] = num[i];
17 | }
18 |
19 | System.out.println(Arrays.toString(num));
20 | System.out.print(Arrays.toString(reverNum));
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Ch06/src/Quiz_6_22.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | public class Quiz_6_22 {
4 | void printSqrt(){
5 | Scanner input = new Scanner(System.in);
6 | System.out.print("Enter a number: ");
7 | double num = input.nextDouble();
8 |
9 | System.out.printf("The result is %f", sqrt(num));
10 | }
11 |
12 | double sqrt(double num){
13 | double nextGuess = 1.0;
14 | double lastGuess;
15 | do {
16 | lastGuess = nextGuess;
17 | nextGuess = (lastGuess + num / lastGuess) / 2;
18 | }
19 | while (Math.abs(nextGuess - lastGuess) > 0.00001);
20 |
21 | return nextGuess;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Ch02/src/Quiz_2_23.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | public class Quiz_2_23 {
4 | public static void computeCost(){
5 | Scanner input = new Scanner(System.in);
6 | System.out.print("Enter the driving distance (mile):");
7 | double distance = input.nextDouble();
8 | System.out.print("Enter miles per gallon:");
9 | double milesOfGallon = input.nextDouble();
10 | System.out.print("Enter price of per gallon($):");
11 | double priceOfGallon = input.nextDouble();
12 |
13 | double cost = (int)(distance / milesOfGallon * priceOfGallon * 1000) / 1000.0;
14 | System.out.print("The cost of driving is $" + cost);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Ch12/src/ChainedExceptionDemo.java:
--------------------------------------------------------------------------------
1 | /**
2 | * @author callmezh
3 | */
4 | class ChainedExceptionDemo {
5 | void printResult() {
6 | try {
7 | method1();
8 | } catch (Exception ex) {
9 | ex.printStackTrace();
10 | }
11 | }
12 |
13 | private static void method1() throws Exception {
14 | try {
15 | method2();
16 | } catch (Exception ex) {
17 | //捕获method2抛出的异常,并被包装成一个新异常
18 | throw new Exception("New information from method1", ex);
19 | }
20 | }
21 |
22 | static void method2() throws Exception{
23 | throw new Exception("New information from method2");
24 | }
25 | }
--------------------------------------------------------------------------------
/Ch05/src/com/company/MulitplicationTable.java:
--------------------------------------------------------------------------------
1 | package com.company;
2 |
3 | public class MulitplicationTable {
4 | public void printMultiplicationTable(){
5 | System.out.println(" Multiplication Table");
6 | System.out.print(" ");
7 | for (int i = 1; i <= 9; i++){
8 | System.out.printf(" " + i);
9 | }
10 |
11 | System.out.print("\n--------------------------------------------------");
12 | for (int j = 1; j < 10; j++){
13 | System.out.printf("\n %d | ", j);
14 | for (int i = 1; i <= j; i++){
15 | System.out.printf("%4d", j * i);
16 | }
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Ch08/src/Quiz_8_6.java:
--------------------------------------------------------------------------------
1 | /**
2 | * 矩阵乘法
3 | * @author callmezh
4 | */
5 | public class Quiz_8_6 {
6 | void printResult(){
7 | int [][] arrayA = Array.createArray(2);
8 | int [][] arrayB = Array.createArray(2);
9 | Array.printArray(arrayA);
10 | Array.printArray(arrayB);
11 | int [][] result = new int[2][2];
12 |
13 | for (int i = 0; i < arrayA.length; i++){
14 | for (int j = 0; j < arrayA[i].length; j++){
15 | for (int k = 0; k < result[0].length; k++){
16 | result[i][j] += arrayA[i][k] * arrayB[k][j];
17 | }
18 | }
19 | }
20 | Array.printArray(result);
21 | }
22 | }
--------------------------------------------------------------------------------
/Ch02/src/Quiz_2_13.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | public class Quiz_2_13 {
4 | public static void getInterest(){
5 | double interest = 0;
6 | double allMoney = 0;
7 | Scanner input = new Scanner(System.in);
8 | System.out.print("请输入每月定投金额(¥):");
9 | double amount = input.nextDouble();
10 | System.out.print("请输入存期(月):");
11 | int months = input.nextInt();
12 | for(int i = 1; i < months + 1; i ++){
13 | allMoney = (amount + allMoney) * 1.00417;
14 | interest = allMoney - amount * months;
15 | }
16 | System.out.print("到期得利息" + interest + "元,本金加利息共得" + (int)(allMoney * 100) / 100.0 + "元");
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Ch03/src/Quiz_3_12.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | public class Quiz_3_12 {
4 | public static void computeNum(){
5 | Scanner input = new Scanner(System.in);
6 | System.out.print("Enter a three-digit integer :");
7 | int oldNum = input.nextInt();
8 |
9 | int num = oldNum;
10 | int h = num / 100;
11 | num %= 100;
12 | int t = num / 10;
13 | num %= 10;
14 | int s = num;
15 |
16 | int newNum = s * 100 + t * 10 + h * 1;
17 | if (newNum == oldNum){
18 | System.out.print( newNum + " is a palindrome");
19 | }else
20 | System.out.print( newNum + " is not a palindrome");
21 |
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Ch05/src/com/company/Quiz_5_41.java:
--------------------------------------------------------------------------------
1 | package com.company;
2 |
3 | import java.util.Scanner;
4 |
5 | public class Quiz_5_41 {
6 | void maxNumCount(){
7 | Scanner input = new Scanner(System.in);
8 | System.out.print("Enter the number, end with 0: ");
9 | int num = input.nextInt();
10 | int max = num;
11 | int count = 0;
12 | while (num != 0){
13 | num = input.nextInt();
14 | if (max >= num){
15 | count++;
16 | }else {
17 | max = num;
18 | count = 0;
19 | }
20 | }
21 | System.out.printf("The largest number is %d, the count is %d", max, count);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Ch07/src/Quiz_7_9.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | public class Quiz_7_9 {
4 | void printMinNum(){
5 | Scanner input = new Scanner(System.in);
6 | System.out.print("Enter 5 integer: ");
7 | int[] array = new int[5];
8 |
9 | for (int i = 0; i < 5; i++){
10 | array[i] = input.nextInt();
11 | }
12 |
13 | System.out.printf("The min number is %d", min(array));
14 |
15 | }
16 |
17 | static int min(int[] array){
18 | int min = array[0];
19 | for (int i = 1; i < array.length; i++){
20 | if (min > array[i]){
21 | min = array[i];
22 | }
23 | }
24 | return min;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Ch04/src/FormatDemo.java:
--------------------------------------------------------------------------------
1 | public class FormatDemo {
2 | public void printTable(){
3 | int age = 20;
4 | System.out.printf("%-10s%-10s%-10s\n", "姓名", "性别", "年龄");
5 | System.out.printf("%-10s%-10s%-10d\n", "徐泽林", "男", 20);
6 | System.out.printf("%-10s%-10s%-10d\n", "张光军", "男", age);
7 | System.out.printf("%-10s%-10s%-10d\n", "张圣航", "男", age);
8 | System.out.printf("%-10s%-10s%-10d\n", "王悟信", "男", age);
9 | System.out.printf("%5.2f%% %5.4e\n", 32.327, 32.32);
10 |
11 | short i = 'a';
12 | long k = 's';
13 | int x = 0;
14 | int y = x + i;
15 | double z = k;
16 | System.out.print( "" + y + " " + z);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Ch07/src/Quiz_7_3.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | public class Quiz_7_3 {
4 | void countNum(){
5 | Scanner input = new Scanner(System.in);
6 | System.out.print("Enter the numbers and end with 0: ");
7 | int[] count = new int[100];
8 | int num;
9 | do {
10 | num = input.nextInt();
11 | if (num > 0 && num <= 100){
12 | count[num - 1]++;
13 | }
14 | }while (num != 0);
15 |
16 | for (int i = 0; i < 100; i++){
17 | if (count[i] != 0){
18 | System.out.printf("%d occurs %d %s\n", i + 1, count[i], (count[i] == 1 ? "time" : "times"));
19 | }
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Ch05/src/com/company/Quiz_5_14.java:
--------------------------------------------------------------------------------
1 | package com.company;
2 |
3 | import java.util.Scanner;
4 |
5 | public class Quiz_5_14 {
6 | public void computeMaxConventionNum(){
7 | Scanner input = new Scanner(System.in);
8 | System.out.printf("Enter an integer: ");
9 | int num1 = input.nextInt();
10 | System.out.printf("Enter another integer: ");
11 | int num2 = input.nextInt();
12 |
13 | int min = Math.min(num1, num2);
14 | for (int k = min; k > 0; k--){
15 | if (num1 % k == 0 && num2 % k == 0){
16 | System.out.printf("The max number of convention is %d", k);
17 | System.exit(1);
18 | }
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Ch04/src/OrderTwoCities.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | public class OrderTwoCities {
4 | public void orderTwoCities(){
5 | Scanner input = new Scanner(System.in);
6 | System.out.print("Enter two cities' name: ");
7 | String name1 = input.next();
8 | String name2 = input.next();
9 |
10 | char firstCharacterOfName1 = name1.charAt(0);
11 | char firstCharacterOfName2 = name2.charAt(0);
12 |
13 | if (firstCharacterOfName2 > firstCharacterOfName1){
14 | System.out.println("The cities in alphabetical order are " + name1 + " " + name2);
15 | }else
16 | System.out.println("The cities in alphabetical order are " + name2 + " " + name1);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Ch04/src/Quiz_4_7.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | public class Quiz_4_7 {
4 | public void showCoordinat(){
5 | Scanner input = new Scanner(System.in);
6 | System.out.print("Enter the radius of the bounding circle: ");
7 | double ridius = input.nextDouble();
8 | System.out.print("Enter the number of sides: ");
9 | int numOfSide = input.nextInt();
10 |
11 | double angle = Math.toRadians(360 / numOfSide);
12 | System.out.println("The coordinates of five points on the pentagon are: ");
13 | for (int i = 0; i < numOfSide; i++){
14 | System.out.printf("(%3.4f, %3.4f)\n", ridius * Math.sin(angle * i), ridius * Math.cos(angle * i));
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Ch06/src/Quiz_6_25.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | public class Quiz_6_25 {
4 | void printTime(){
5 | Scanner input = new Scanner(System.in);
6 | System.out.print("Enter the millis: ");
7 | long millis = input.nextLong();
8 |
9 | System.out.printf("The time is %s", convertMillis(millis));
10 | }
11 |
12 | static String convertMillis(long millis){
13 |
14 | long totalSecond = millis / 1000;
15 | long second = totalSecond % 60;
16 |
17 | long totalMin = totalSecond / 60;
18 | long min = totalMin % 60;
19 |
20 | long totalHour = totalMin / 60;
21 | long hour = totalHour;
22 |
23 | return "" + hour + ":" + min + ":" + second;
24 | }
25 | }
--------------------------------------------------------------------------------
/Ch03/src/SubtractionQuiz.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | public class SubtractionQuiz {
4 | public static void subtract(){
5 | int num1 = (int)(Math.random() * 100);
6 | int num2 = (int)(Math.random() * 100);
7 |
8 | if(num1 < num2){
9 | int temp = num1;
10 | num1 = num2;
11 | num2 = temp;
12 | }
13 | System.out.print(num1 + "-" + num2 + "=");
14 | Scanner input = new Scanner(System.in);
15 | int result = input.nextInt();
16 | if(num1 - num2 ==result){
17 | System.out.print("The result is correct");
18 | }else
19 | System.out.print("The result is incorrect, right answer is " + (num1 - num2));
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Ch12/src/WriteData.java:
--------------------------------------------------------------------------------
1 | import java.io.File;
2 | import java.io.FileNotFoundException;
3 | import java.io.IOException;
4 | import java.io.PrintWriter;
5 |
6 | public class WriteData {
7 | static void printResult() throws IOException {
8 | File file = new File("score.txt");
9 | if (file.exists()){
10 | System.out.println("File already exists");
11 | System.exit(1);
12 | }
13 |
14 | PrintWriter output = new PrintWriter(file);
15 |
16 | //write formatted output to the file
17 | output.print("zh");
18 | output.println(99);
19 | output.print("wf");
20 | output.println(89);
21 |
22 | //close the file
23 | output.close();
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Ch11/src/CastingDemo.java:
--------------------------------------------------------------------------------
1 | /**
2 | * @author callmezh
3 | * instanceof应用举例
4 | */
5 | public class CastingDemo {
6 | public static void displayObject(Object object){
7 | if (object instanceof CircleFromSimpleGeometricObject){
8 | System.out.println("The circle area is " +
9 | ((CircleFromSimpleGeometricObject)object).getArea());
10 | System.out.println("The circle diameter is " +
11 | ((CircleFromSimpleGeometricObject)object).getDiameter());
12 | }else if (object instanceof RectangleFromSimpleGeometricObject){
13 | System.out.println("The rectangle area is " +
14 | ((RectangleFromSimpleGeometricObject)object).getArea());
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/Ch07/src/Quiz_7_20.java:
--------------------------------------------------------------------------------
1 | import java.util.Arrays;
2 |
3 | class Quiz_7_20 {
4 | void printSelectionSort(){
5 | int[] numArray = {3, 4, 6, 8 ,9 , 0, 5, 2};
6 | System.out.print(Arrays.toString(selectionSort(numArray)));
7 | }
8 |
9 | private static int[] selectionSort(int[] list){
10 | for (int i = list.length - 1; i >= 0; i--){
11 | int max = list[i];
12 |
13 | for (int j = i - 1; j >= 0; j--){
14 | if (list[j] > max){
15 | max = list[j];
16 |
17 | int temp = list[i];
18 | list[i] = list[j];
19 | list[j] = temp;
20 | }
21 | }
22 | }
23 | return list;
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Ch06/src/Quiz_6_26.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | public class Quiz_6_26 {
4 | void printPalindromePrimeNum(){
5 | Scanner input = new Scanner(System.in);
6 | System.out.print("Enter a number: ");
7 | int num = input.nextInt();
8 |
9 | int count = 0;
10 | int i = 2;
11 | //大于等于2,因为这样可以直接排除1的可能性
12 | while (i <= num){
13 | if (PrimeNumMethod.isPrimeNum(i) && Quiz_5_3.isPalindrome(String.valueOf(i))){
14 | count++;
15 |
16 | if (count % 10 == 0){
17 | System.out.printf("%4d\n", i);
18 | }else
19 | System.out.printf("%4d", i);
20 | }
21 |
22 | i++;
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Ch06/src/Quiz_6_6.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | public class Quiz_6_6 {
4 | void printPattern(){
5 | Scanner input = new Scanner(System.in);
6 | System.out.print("Enter the number: ");
7 | int num = input.nextInt();
8 | dipalyPattren(num);
9 | }
10 |
11 | static void dipalyPattren(int num){
12 | for (int i = 1; i <= num; i++){
13 |
14 | for (int k = i; k < num; k++){
15 | System.out.print(" ");
16 | }
17 |
18 | for (int j = i; j >= 1; j --){
19 | if (j == 1){
20 | System.out.printf("%4d\n", j);
21 | }else
22 | System.out.printf("%4d", j);
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Ch07/src/Quiz_7_10.java:
--------------------------------------------------------------------------------
1 | import java.util.Scanner;
2 |
3 | public class Quiz_7_10 {
4 | void printMinNumIndex(){
5 | Scanner input = new Scanner(System.in);
6 | System.out.print("Enter the number of number: ");
7 | int n = input.nextInt();
8 |
9 | int[] array = InputInteger.getArray(n);
10 |
11 | System.out.printf("The smallest number's index is %d", min(array));
12 | }
13 |
14 | static int min(int[] array){
15 | int min = array[0];
16 | int minNumIndex = 1;
17 | for (int i = 1; i < array.length; i++){
18 | if (min > array[i]){
19 | min = array[i];
20 | minNumIndex = i + 1;
21 | }
22 | }
23 | return minNumIndex;
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Ch11/src/MyStack.java:
--------------------------------------------------------------------------------
1 | import java.util.ArrayList;
2 |
3 | public class MyStack {
4 | private ArrayList