Skip to content

Nothing much here, Just basic Java Coding that I'm wanting to learn from years!

Notifications You must be signed in to change notification settings

AVidhanR/CodingInJava

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Nothing much here, Just basic Java Coding that I'm wanting to learn from years!

Feel free to visit my portfolio from here
Follow me on LinkedIn: in/AVidhanR


The Below codes, sure is handy

// if return type is List<Integer>
return Arrays.asList(a, b);

In 2D matrix, the below code is handy

// for traversing and other element level operations
for (int[] rows : matrix) {
    for (int ele : rows) {
        sum += ele;
    }
}

While using String's as char's the below code is handy,

for (char c : v.toCharArray()) {
    // something here...    
}

Typical git-cli things,

git add . && git commit -m "" && git push origin main
# Fetch the latest changes from the remote repository
git fetch origin
git pull origin main

The below code check

// I ain't understood a thing the below code
for (int t = n; t > 0; t /= 2) {
    b = (t % 2) + b;
}

// so I used the below abstract method
return Integer.toBinaryString(num);

About

Nothing much here, Just basic Java Coding that I'm wanting to learn from years!

Topics

Resources

Stars

Watchers

Forks

Languages