GoConqr has a new look! Let us know what you think.

Flashcards

Java

R B Core Java Java Developer English 29 cards

Cards in this deck (29)

  1. 1What is sealed class?Sealed class is introduced in Java 17 and it allows to specify what classes can inherit this class.
    public abstract sealed class Shape permits
    Circle, Rectangle, Square
  2. 2What is record type?Record is introduced in java 14. It is type with implicit getters, setters, constructor, equals, hashCode, toString.
    record Point(int x , int y) {}
  3. 3What -Xmx parameter stands for?-Xmx parameter defines maximum heap size.
  4. 4What -Xms parameter stands for?-Xms parameter defines initial heap size.
  5. 5What is heap space in Java memory?The part of memory to store instantiated objects.
  6. 6What is Young generation in Java memory?It is a part of Heap space. Here are all newly created objects.
  7. 7What is Eden in Java memory?It is part of young generation of heap space. When it is full then minor GC is performed.
  8. 8What is Survivor space in Java memory?It is a space where objects are moved from eden after they survive the GC cycle. In case some objects survived many cycles of GC then they are moved to old generation.
  9. 9What is Perm Gen in Java memory?It contains application metadata required by JVM to describe classes and methods. it is separate from heap. contains also java libraries and methods
  10. 10What is Method area in Java memory?Part of Perm Gen. contains class structure. contains also Runtime Constant Pool - per class runtime containing constants, static methods.
  11. 11What is Memory Pool in Java memory?created by JVM to store immutable objects ex. String Pool. Can belong to Heap or Perm Gen.
  12. 12What is Stack Memory in Java?It is used for execution of thread. it is short-lived.
  13. 13What is inheritence?One class can extend another one. It provides code reusability.
  14. 14What is encapsulation?It is designed to protect code from others, for easier maintaining. To encapsulate we can use access modifiers: private, protected
  15. 15What is polymorphism?single object can refer to super-class or sub-class depending on the reference type.
  16. 16What is Abstract class?You can't create instance of abstract class.
    Can have abstract and regular methods.
    Abstract class can be inherited.
    If it contains abstract method than all classes that are inheriting this abstract class must implement this method.
    We can access static fields/methods using abstract class name.
  17. 17What is overriding method?You can override method of super class or default method of interface. It must have the same name, return type, arguments but can differ in implementation.
  18. 18What is overloading of methon?It is when you are creating method with the same name but with different return type or arguments.
  19. 19What is the purpose of the interface ?It is substitution of multiple inheritence because the class can inherit multiple interfaces. It is kind of template to describe what should be implemented in classes that are implementing it.
  20. 20What are the features of interfaces?1. you cannot instantiate it
    2. does not contain constructor
    3. all methods are abstract by default
    4. interface can have default methods
    5. fields in interface are static, final
  21. 21What is serialization in java?It is converting file into byte stream. If the field is transient than it will be not serialized.
  22. 22What is JVM?Java Virtual Machine, provides run-time env in which java byte-code can be executed.
  23. 23What is JRE?Java Run-time Envitonment - implementation of JVM, set of software tools used for developing java applications. contains set of libraries and files used by JVM at runtime.
  24. 24What is JDK?Java Development Kit. It is development environment. Contains JRE + additional dev tools.
  25. 25What is ClassLoader?Class loader is subsystem of JVM which is used to load class files.
  26. 26This keyword - when it is used?To reference to variable that refers to current object.
  27. 27What is aggregation?When class has a class. Example: employee has Address field.
  28. 28What is Composition in Java?[TODO]
  29. 29—

Information

Description
Java Developer Core Java Flashcards on Java, created by R B on 26/10/2022.
Created by
R B
Views
0
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?