You are on page 1of 2

● General Notes:

○ Always solve step by step using your pencil


○ Consider the semi colon ‘;’ after the if condition or after for loop
○ notice Println or print
○ Valid promotions for primitive data types
○ Global variables cant be called from main unless its static
○ Whenever the questions mentioned the package it will ask about access
modifiers (private, package access, modifier)
○ Read the whole question starting from the import statements
● Fundmentals:
○ Int can assigned with char but char cant assigned with int
○ Float with no ‘f’ is double, and without . is int
○ Mathematical operations precedence
■ ++, -- , *, / , % +, -,
○ Scanner declaration and input errors
○ Formatting the floating number
○ Casting operations can be done automatically when it casting from lower to higher
level in data types but it should be explicitly written if its from higher to lower level
● Selections
○ Not connected else F2 P7
○ Boolean logical | and &
○ Switch perform only on integral numbers and char
● Repetitions
○ Loops declarations
○ For loop declaration scope
○ Notice the body for the loop or only the first line will be executed
● Methods
○ Focus on methods overloading, passing parameters(order and type)
○ Static function used only in static context( scope )
○ Valid promotions for primitave data types
○ Notice the scope of the variables.
● Arrays
○ Arrays is ZEROED indexed which means its starts in 0 index
○ Always solve step by step using your pencil
○ Enhanced for statement
○ Variables arguments array
○ Binary search if its exist it will return the index, if not it will return size of sorted index
with lower values only and added one by negative.
● Static
○ Static methods call only static methods
○ Cant use ( this ) in static context
○ Static methods use only static variables
● Classes
○ Calling constructor only from another constructor
○ Calling constructor only the first line in the constructor
○ Final variables sould be initialized directly or in all the constructors
○ Always check for access modifier and static modifier for every access line
○ Cant call the same constructor recursively.
○ Super class must be called if we dont have default constructor
● Interface
○ All fields are implicitly public, static, final
○ All methods are implicitly public, abstract

You might also like