DSA - Java

Cards (21)

  • Java was developed by James Gosling at Sun Microsystems Inc
  • Java developed in the year 1995 and later acquired by oracle corporation
  • Java helps to create reusable code and modular programs
  • Java is a class-based, object-oriented programming language and
    is designed to have as few implementation dependencies as
    possible.
  • WORA means write once run anywhere
  • WHY IS JAVA CALLED “JAVA”?
    Java is the name of an island in Indonesia where the first
    coffee(named java coffee) was produced.
  • One reason people love Java is
    the Java Virtual Machine
  • Public - this says can anyone run this program
  • All code in Java program must belong to a class
  • Static - this method belongs to the class, not an object
  • When you are working with text, it must be wrapped inside double
    quotations marks
  • Single-line comments start with (//).
  • Multi-line comments start with /* and ends with */
  • All Java variables must be identified with unique names called identifiers.
  • Non-primitive data types are called reference types because they
    refer to objects
  • Arithmetic Operators - These are used to perform common mathematical operations
  • Assignment Operators - These are used to assign values to variables
  • Comparison Operators - These are used to compare two values (or variables). The return value is true or false.
  • Logical Operators - These are used to determine the logic between variables or values.
  • Bitwise Operators - These are used to perform operations on individual bits of the operands. They are useful for low-level programming, such as manipulating bits in memory, encryption, compression, etc.
  • This class is part of the java.util package in
    Java and is used for reading input from different sources, such
    as the keyboard. It provides various methods for reading
    different types of data.
    import java.util.scanner