Java Learning
Java Learning
IntelliJ Shortcuts
Sout – system.out.println
Java follows camel-case syntax for naming the class, interface, method, and variable.
If the name is combined with two words, the second word will start with uppercase letter always such as
actionPerformed(), firstName, ActionEvent, ActionListener, etc.
Static Non-Access Modifier – You can access fields/ methods using the class name.
Static – allows us to call the method and fields using the class Name.
Return Types
F(x) = x + 1
Programming Errors
4. Common Errors
Data Types
OBJECT ORIENTED PROGRAMMING (OOP)
Object – An instance of a class that may contain attributes (Characteristics) and methods. E.g phone,
desk, computer, coffee cup etc.
- Constructors allow us to build objects that have different attributes/ Characteristics that make
them uique.
Overloaded Constructors – multiple constructors within a class with the same name but have different
parameters.
toString() – special method that all objects inherit, that returns a string that “textually represents” an
object.
Arrays
Formula
Advantages of Maven
TestNG - TestNG is a testing framework inspired from JUnit and NUnit but introducing some new
functionalities that make it more powerful and easier to use. It supports test configured by
annotations, data-driven testing, parametric tests, etc.
Static Packages