Check if a given number is a power of 2 | Java

  Рет қаралды 6,934

B Tech Computer Science

B Tech Computer Science

3 жыл бұрын

#Java #CoreJava #Collections #javaForBeginners Check out my Anime Store - anime-stoze.blinkstore.in Subscribe to my channel so that you do not miss any topic.
The phone I used to record - amzn.to/34V1uqX
Phone stand used - amzn.to/3igP9QZ
Lighting I used - amzn.to/3IpYyQO
My laptop - amzn.to/3L1gt1Z
My gaming Keyboard - amzn.to/3Jt66mY
My gaming Mouse - amzn.to/36B4eKE
Headphones - amzn.to/3u3RnbC
My other videos-
Finding Reverse of a Number - • Finding Reverse of a N...
Check if the given number is Prime Number - • Check if given number ...
Finding Minimum and Maximum value from an Array - • Finding Minimum and Ma...
Area and Perimeter of Rectangle - • Area and Perimeter of ...
Program to check if a string is Palindrome - • Palindrome | Program ...
Find sum of digits of a number - • Find sum of digits of ...
Count the number of Digits of a Number - • Count the number of Di...
Java program to print Fibonacci Series - • Java program to print ...
Find Factorial of a number - • Find Factorial of a nu...
Check if a given year is Leap Year - • Check if a given year...
C++ program to Swap two numbers (Using extra variable) - • C++ program to Swap tw...
C++ program to find if a number is ODD or EVEN - • C++ program to find if...
C++ program to find Quotient and Remainder - • C++ program to find Qu...
C++ program to find Sum, Difference, Product, and Divison of two numbers - • C++ program to find Su...

Пікірлер: 11
@VinayKumar-jj2zt
@VinayKumar-jj2zt 9 ай бұрын
good explanation and nice handwriting bro, found easiest than gfg solution itself.
@AbdirisakAbdullahi-zq3in
@AbdirisakAbdullahi-zq3in 7 ай бұрын
good explanation
@aishwaryas5146
@aishwaryas5146 Жыл бұрын
U can simply write like this ri8 if(temp==n) System.out.print("true") Else System.out.print("false")
@VinayKumar-jj2zt
@VinayKumar-jj2zt 9 ай бұрын
yeah he could as it was void type return.
@appscastle
@appscastle 2 жыл бұрын
that is not a good way to do it, but it works
@mithank2666
@mithank2666 2 жыл бұрын
instead of if else we can use String k =(temp==n)?"true":"false"; System.out.println(k); thank you so much
@BTechComputerScience
@BTechComputerScience 2 жыл бұрын
Thanks for ur comments on so many of my video, I really appreciate the support 💙
@mithank2666
@mithank2666 2 жыл бұрын
@@BTechComputerScience you deserve bro Thank you😍
@mrinmoykalita5726
@mrinmoykalita5726 Жыл бұрын
This program can't run where can you get math
@BTechComputerScience
@BTechComputerScience Жыл бұрын
I am unable to understand ur query, can u be more clear.
@mrinmoykalita5726
@mrinmoykalita5726 Жыл бұрын
@@BTechComputerScience int n= sc.nextInt(); Int val =(n&(n-1)); If(val ==0){ System.out.println("true"); } Else {system.out.println("false") }
Understanding ASCII Values | Java
5:31
B Tech Computer Science
Рет қаралды 14 М.
ИРИНА КАЙРАТОВНА - АЙДАХАР (БЕКА) [MV]
02:51
ГОСТ ENTERTAINMENT
Рет қаралды 13 МЛН
Tom & Jerry !! 😂😂
00:59
Tibo InShape
Рет қаралды 67 МЛН
когда повзрослела // EVA mash
00:40
EVA mash
Рет қаралды 4,1 МЛН
World’s Deadliest Obstacle Course!
28:25
MrBeast
Рет қаралды 160 МЛН
Strong Number | Java | Program to Find if the Given Number is Strong Number
11:26
B Tech Computer Science
Рет қаралды 14 М.
Java Program #32 - Calculate the Power of a Number in Java
6:33
Programming For Beginners
Рет қаралды 8 М.
Find if a Number is power of Two
4:45
CppNuts
Рет қаралды 4,3 М.
Armstrong Number | To check if a given number is an Armstrong number or not | Java
10:21
Power of Two | LeetCode problem 231
4:03
Technosage
Рет қаралды 4,5 М.
Solving the 5-Room-Puzzle / Autism Test
15:13
skaai
Рет қаралды 59 М.
Finding Reverse of a Number | Java | Detailed Explanation
11:36
B Tech Computer Science
Рет қаралды 47 М.
Power of 2 | School Practice Problem | GeeksforGeeks School
2:26
GeeksforGeeks School
Рет қаралды 1 М.
ИРИНА КАЙРАТОВНА - АЙДАХАР (БЕКА) [MV]
02:51
ГОСТ ENTERTAINMENT
Рет қаралды 13 МЛН