[Java] Java Silver Study Day 1

1 minute read

Nice to meet you. It is snbmsn03.

Current Goal: Java SE8 Silver Pass Work experience: C# 1 year

Study method

I purchased this collection of problems.

text Thorough capture Java SE 8 Silver problem collection [1Z0-808] support Sumito Shiga From https://www.amazon.co.jp/dp/4844339931/ref=cm_sw_r_tw_dp_U_x_N3y5EbAHQYKDT @amazonJP image.png

For confirmation of one’s understanding, output purpose, I will write without deciding who will read it. In the same way, I would be happy if someone studying Java Silver could find it and use it as a reference.

If you have any mistakes, I would appreciate it if you could point me out.

Java final modifier

  • Placed: all classes, methods, variables -Class: Inheritance prohibited -For method: Prohibit overriding -For variables: Prohibition of resubstitution

  • Understood -Can be used not only for variables but also for classes and methods -Similar to const in C# -Is it slightly different from const in C#? (I haven’t fully understood it yet, so I just pasted the quotation) (https://seesaawiki.jp/w/noboru2004/d/Java%20%A4%CE%20final%20%A4%C8%20C%20%A4%CE%20const%20%A4%CE%B0%E3 (%A4%A4%A1%A3)

switch-restrictions on the types that can be put in a case with a case statement

  • Some types can not be put -float,double,boolean

You can omit the {} braces after the ### if statement condition.

  • If you omit it, the following one sentence will be processed when the conditional expression is true
  • {} curly braces should be included as it will be less readable

Tags:

Updated: