[Useful to remember !!!] Easy creation of inherited classes in Eclipse

1. Prior knowledge

-[Latest] How to build Java environment on Ubuntu

-[Even beginners can do it! ] How to create a Java environment on Windows 10 (JDK14.0.1)

-[Easy-to-understand explanation! ] How to use Java instance

-[Even beginners can do it! ] How to install Eclipse on Windows 10 (Java environment construction)

As prior knowledge, the contents of the above link are required.

2. Easy creation of subclasses from superclasses

03.png

  1. Select [File (F)] → [New (N)] → [Class]. 01.png
  2. Click the Browse button. 02.png
  3. Select the class you want to inherit and click the ʻOK` button. 03.png
  4. Check the superclass and click the Done button. 04.png
  5. Success if you can confirm the creation of subclass.

2. Easy creation of superclass from subclass

05.png

  1. Right-click in the file you want to make a subclass and select [Refactoring (T)] → [Extract Superclass (T)]. 06.png
  2. Enter the superclass name and click the Done button. 07.png 08.png
  3. Success if you can confirm the creation of subclass and superclass.

3. Bonus: Easy creation of System.out.println ()

09.png

  1. Type sysout and press Ctrl + Space on your keyboard. 10.png
  2. Success if you can confirm the creation of System.out.println ().

3. Related

-[Useful to remember !!!] Easy creation of constructor and getter / setter in Eclipse -[Even beginners can do it! ] How to write Javadoc -[Easy-to-understand explanation! ] How to use Java encapsulation -[Easy-to-understand explanation! ] How to use Java overload -[Easy-to-understand explanation! ] How to use Java inheritance [Override explanation]

Recommended Posts

[Useful to remember !!!] Easy creation of inherited classes in Eclipse
[Useful to remember !!!] Easy creation of constructor and getter / setter in Eclipse
To debug in eclipse
Introduction of javaFX in Eclipse (April 2020)
How to run JUnit in Eclipse
How to use classes in Java?
How to set Lombok in Eclipse
How to include Spring Tool in Eclipse 4.6.3?
Summary of root classes in various languages
[For beginners] How to debug in Eclipse