Skip to content

basecs101/core-java-concepts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Core-Java-Concepts-And-Programs

Exploring almost everything in core java

  1. Java Introduction
    • what, why and how @ Java Programming
  2. Java Architecture
    • Java development Kit JDK
    • Java Runtime Environment JRE
    • Java Virtual Machine JVM
    • What is Java Source code(.java file) and ByteCode(.class file)
    • ClassLoader, Linker and JIT compiler
  3. What is classpath and how to set it.
  4. Number System
    • Binary, Decimal, Octal and Hexadecimal
    • Conversion from binary to decimal and vice-versa
  5. Memory Types
    • Primary memory/Main Memory/ Random Access Memory
    • Secondary memory/Disk/ Read Only Memory
    • Cache and cache layering
    • Stack, Heaps and Method Areas
  6. Installation of JDK and Running HelloWorld.java program, and IntelliJ Idea Basics.
  7. DataTypes
    • Primitive(8 primitive types and their wrapper classes)
    • and Non-Primitive(classes and arrays)
  8. Conditional Statement -
    • if , if-else and multiple if and if-else
    • nested if and if-else
  9. Control Statement - Switch case and its examples
  10. Java Comments and Java Documentations
    • Single line comment
         // hello single line comment
    
    • Multiline comment
        /*
        Hello from
        multi line comment
        */
    
    • Java Doc
       /**
        * This class {@code Shape} is an abstract class to demonstrate partial abstraction
        * and features of abstract class.
        *
        * @author Vikram Gupta
        */
    
  11. Classes and Objects
  12. Static and Instance methods
  13. Java Packages
  14. Access Modifiers/ Access Level/ Access Specifier
    1. Private
    2. Default
    3. Protected
    4. Public
  15. Primitive Data and their Type Casting

    int to float and int to byte and other primitives

  16. Everything about Constructor
    1. Rules
    2. Types
    3. Overloading
    4. Chaining
  17. this and super keywords and their usages And this() and super() calls
  18. Object Oriented Programming Paradigms
    1. Inheritance
    2. Composition
      • what is composition and how to implement it
      • How composition and inheritance are different
    3. Encapsulation
    4. Polymorphism
      • Overloading/static polymorphism/ compile time polymorphism
      • Overriding/ dynamic polymorphism/ runtime polymorphism
    5. Abstraction
      • Interfaces --> full abstraction
      • Abstract class --> partial abstraction
      • Diamond problem and solution
  19. Immutable class and String, String Pool
    1. Make all fields private
    2. Create all argument constructor
    3. Remove All setters
    4. Use deep clone for objects in the constructor and getter methods
    5. Make class as final
    6. Optional rule - make all fields as final
  20. Everything you need to know about String Constant Pool
  21. String, StringBuilder and StringBuffer
  22. Anonymous class and inner classes
  23. Enum and their usage
  24. Syntax Error, Exception, and Errors and Exception Handling Mechanism and their types
    • Throwable - The Throwable class is the superclass of all errors and exceptions in the Java language. Only objects that are instances of this class (or one of its subclasses) are thrown by the Java Virtual Machine or can be thrown by the Java throw statement. Similarly, only this class or one of its subclasses can be the argument type in a catch clause. For the purposes of compile-time checking of exceptions, Throwable and any subclass of Throwable that is not also a subclass of either RuntimeException or Error are regarded as checked exceptions. Instances of two subclasses, Error and Exception, are conventionally used to indicate that exceptional situations have occurred. Typically, these instances are freshly created in the context of the exceptional situation so as to include relevant information (such as stack trace data)

    • Error - An Error is a subclass of Throwable that indicates serious problems that a reasonable application should not try to catch. Most such errors are abnormal conditions. The ThreadDeath error, though a "normal" condition, is also a subclass of Error because most applications should not try to catch it.

    • Exception - The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch. The class Exception and any subclasses that are not also subclasses of RuntimeException are checked exceptions. Checked exceptions need to be declared in a method or constructor's throws clause if they can be thrown by the execution of the method or constructor and propagate outside the method or constructor boundary.

  25. Java - 5 Feature : Java generics and how to use them.
    • Generics avoid code duplication and with the help of Generics the same class or method can be reused for different data types.

  26. How final, finally and finalize() different
  27. Loose and Tight Coupling and why always prefer loose coupling over tight coupling
  28. Java 8 features
    1. Functional Interface and default and static methods

    2. Lambda expression

    3. Stream APIs and More Stream methods

    4. Java Optional

      • The purpose of the Optional class is to provide a type-level solution for representing optional values instead of null references.

      • A container object which may or may not contain a non-null value. If a value is present, isPresent() returns true. If no value is present, the object is considered empty and isPresent() returns false.

      • To create an empty Optional object, we simply need to use its empty() static method: Optional<String> empty = Optional.empty(); assertFalse(empty.isPresent());

      • We can also create an Optional object with the static method of(): String name = "baeldung"; Optional<String> opt = Optional.of(name); assertTrue(opt.isPresent()); However, the argument passed to the of() method can't be null. Otherwise, we'll get a NullPointerException:

    5. Method Reference

  29. Is Java Pass by value or pass by reference
  30. Primitives and their Wrapper classes. Auto boxing and Auto unboxing.

About

Exploring almost every concept in Core Java

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages