0% found this document useful (0 votes)
22 views33 pages

Tech Java

The document outlines various programming concepts including static blocks, memory allocation, constructors, and method execution order. It discusses array types, inheritance, data abstraction, exception handling, and the collection framework. Additionally, it touches on threading and password validation techniques.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views33 pages

Tech Java

The document outlines various programming concepts including static blocks, memory allocation, constructors, and method execution order. It discusses array types, inheritance, data abstraction, exception handling, and the collection framework. Additionally, it touches on threading and password validation techniques.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Static

boack , methods , variable alloacated memory and init

Common memory

Top order of execution


1)static blocks 2) static methods [main funct] ,

Without obj we need to access:


Constructor – init non static variables , obj create – construct- var init

Practice exp:
This keyword-> current obj oda non static var point out ku

Implicit timecasting

Explicit timecasting float f =a/(float) b

Either the numerator or deminonator will be in float ( Factorial)


Pattern
Char+int =integer
Odd: a=a+row

Even: a=a+new+1
ARRAY-

Unsorted and sorting ;

Static and dynamic – size of the array may increase or decrease ;


Variable should be initialized and check the element and if not reset

Based on passing values:

Call by value – value

Call by ref- pass the ref of the object ref


Array size would be static and fixed ;
Jagged Array.
@Override-aotation (changing the implementation & writing my own implementation )- it will call
the toString();
Obj class-by extent default methods//

Stringbuilder -oru oru char capacity

Inheritance- child class inherits the property of parent cls

Single,multilevel,hierarchical-support

Multiple,hybrid-doesn’t support (interface [multiple parent class-one child class])

Only child class access the property of parent class


Object class
Data abstraction: implementation-hide , child class or chilla imple ah showcase pannanum

Non static methods-with imple

Abstract method- with imple

Abstract class la object create panna mudiyathu…..

Interfaces-abstract class , we use implements

Disadvantages of abstract class is we couldn’t use multiple parent class instead we use interface…..

Static void(){} – commom memory ;

Default void(){}- we can use object to access;

Collectionframework :we can access through object in the class


Exception handling – Error & Exception

Exception is a class : try{block of statement }catch(exception e ){}

Finally -it will execute in it when we provide a content.

Catch-finally , it won’t work (becoz, [finally-try],[try-catch-finally])


Throw -for exception

Throws for declaration

Count of passwd-2 alp cap,5-apl small,special character , use if (if(if())) to validate password , it
should be around 12 characters

When the num is divided and factorial by the num ,the result gets the same as num means strong
number;
Print all the odd number in backward.
Amstrong number.

Instead of using sum, we use rev to get the palindrome patterns ………
Kaprekar number theory
Thread is a subprocess ,(parent class)
If we use start(), runs along with main function; there is no execution order in the threads

New,runable,running-start,waiting-joins , terminate
Collection framework: list,queue,set,map

Array-stack,arraylist -it can grow and list

Interfaces kula default and static may be used .

You might also like