Frequently Asked Java Program 15: Print Even & Odd Numbers from an Array
ฝัง
- เผยแพร่เมื่อ 10 ต.ค. 2019
- Topic : Print Even & Odd Numbers from an Array
#########################
Udemy Courses:
#########################
Manual Testing+Agile with Jira Tool
************************************
► shorturl.at/xNXZ4
Selenium with Java+Cucumber
********************************
► shorturl.at/aIKMW
Selenium with Python & PyTest
********************************
► shorturl.at/ELW09
Selenium with python using Robot framework
****************************************
► shorturl.at/bcDPZ
API Testing(Postman, RestAssured & SoapUI)
*****************************************
► shorturl.at/uAWY7
Web & API Automation using Cypress with Javascript
********************************************
► rb.gy/4uum2n
Playwright with Javascript
**************************
► shorturl.at/gALZ1
Jmeter-Performance Testing
************************
► rb.gy/ocj7r2
SDET Essencials(Full Stack QA)
*************************
► rb.gy/hlnf2v
Appium-Mobile Automation Testing
************************************
► rb.gy/wmzv64
Java Collections
*****************
► bit.ly/3S66ezE
Python Programming
*********************
► urlis.net/gdsfpb0s
Cucumber BDD Framework
***************************
► bit.ly/3F7d69r
Protractor with Javascript
***************************
► urlis.net/4uddm1qb
####################################
TH-cam Playlists:
####################################
Manual Testing & Agile
***********************
► bit.ly/3ujvaYa
► bit.ly/3OYzxQj
SQL
*************************
► bit.ly/3R6XjeG
► bit.ly/3nE0a1s
► bit.ly/3IeKuuJ
linux & Shell Scripting
**********************
► bit.ly/3up1Z6a
► bit.ly/3nzvGxx
Java
**********************
► bit.ly/3R9QfOs
► bit.ly/3AoRMKM
► bit.ly/3IbTTDn
► bit.ly/3ybXInv
► bit.ly/3yCoHdw
Selenium With Java+Cucumber
********************************
► bit.ly/3P2FMm4
► bit.ly/3yhiIt4
► bit.ly/3uokzet
► bit.ly/3a7XIND
► bit.ly/3umN2S9
► bit.ly/3aar7GW
► bit.ly/3y9kD2S
► bit.ly/3uhLskn
Python
********************************
► bit.ly/3agNgU0
► bit.ly/3NJNnoy
► bit.ly/2CTQ4mR
► bit.ly/3OIYWh1
Selenium With Python,Pytest&Behave
***************************************
► bit.ly/3OHHoC9
► bit.ly/3IeNLdv
► bit.ly/2J4tPeT
► bit.ly/3ydSkAq
Selenium With Python Using Robert Framework
(Web&API Testing)
*************************************************
► bit.ly/3nUvlpr
► bit.ly/3nUvE3z
API Testing (Postman,SoapUi,&Rest Assured)
**********************************************
► bit.ly/3OXacWY
► bit.ly/3yh0UhE
► bit.ly/3nC9DWQ
► bit.ly/3yGfhNS
► bit.ly/3OJa11H
► bit.ly/3P2slCC
Mobile App Testing Appium
****************************
► bit.ly/3Al49HG
Performance Testing Jmeter
*******************************
► bit.ly/3nz4fE7
Maven,Jenkins,Git,Github,CI/CD
*******************************
► bit.ly/3P16HPj
► bit.ly/3yhlUVA
► bit.ly/3afYfwT
► bit.ly/3yGzweG
► bit.ly/3yF73Ws
► bit.ly/3NCOmH7
SQL,DB Testing&ETL,Bigdata
*******************************
► bit.ly/3NKOcNY
► bit.ly/3OVpDyI
► bit.ly/3NEvUy0
► bit.ly/3IryxlT
► bit.ly/3RkWBLh
JavaScript Based Automation Tools
********************************
► bit.ly/3nUx51X
► bit.ly/3AqI6Q0
► bit.ly/3yeurbT
► bit.ly/3ujzpTK
Selector Hub Tools
********************
►rb.gy/h3h424
GraphQL
******************
► rb.gy/sj3gys
Cypress API Testing
********************
► shorturl.at/fjKPX
Cypress Web Testing
**********************
► shorturl.at/agjlK
Playwright with Javascipt
**************************
► shorturl.at/adSTY
#JavaEvenOddArray
#ArrayEvenOddJava
#EvenOddNumbers
#ArrayManipulation
#JavaProgramming
#ArrayOperations
#EvenNumbers
#OddNumbers
#ArrayIteration
#JavaArrays
#ProgrammingLogic
#JavaCode
#CodingPractice
#LoopingInJava
#ArrayTraversal
#JavaTips
#JavaTricks
#Algorithm
#JavaDevelopment
#CodeExamples
#JavaLearning
#JavaBasics
#ProgrammingInJava
#CodingInJava
#LogicBuilding
#ArrayPrinting
#JavaFunctions
#EvenOddLogic
#JavaProblemSolving
#ArrayManipulation
#JavaSnippets
#CodingChallenges
#JavaArrays101
#LogicalThinking
#JavaAlgorithms
#ArrayAlgorithms
#JavaHelp
#JavaCommunity
#JavaTricks
#CodeTips
#JavaCoders
#ProgrammingHelp
#JavaSolutions
#ArrayProblems
#JavaPuzzles
#CodeOptimization
#JavaTraining
#LearnJava
#JavaTutorials
#ProgrammingProblems
I need same program but allow user to enter 10 numbers, and how may it print in descendent values
Good day sir! What if the numbers were not given at all? how can we do that
What if you want to print the array to the console with only the even numbers?
Thank you, now it "clicked" for me :)!
public class PrintEvenOddNumbersFromArray {
public static void main(String[] args) {
String odd="";
String eve="";
int arr[]={1,2,3,4,5};
for(int i=0;i
Why it's not showing duplicate local variable i
Thank you sir, I have zero knowledge in coding. very easy understandable. 😀👍🤝
Glad to hear that
sir plz do on video about printing pattern
what if the pattern is different like {3,2,1,5,6,4}? Will it still get the odd and even numbers in any oreder?
yes it will
Sir instead of using !=0 we use ==1 in odd numbers if statement
No, I think you can't write ==1 for odd numbers because in some conditions the remainder may come other than 1 and it will be an odd number but the line will only execute only if remainder is equal to 1.so, it is better to write ! =0 so that whatever the remainder will be other than 0 it will be an odd.
Hi Praveen , how to do a pattern program.
Thank you, this really helps alot
Welcome
Excellent 👌
Thanks
Can anybody solve thi in O(n) means only using one loop
do we need two for loops for this
I think no we can get The odd numbers within only one for loop by writing else statement
Sir can we use i
we wont be using it here cause the loop will run for (a.length-1) which means from 1 to 5...it wont be taking the last value at all.
comparing it with index that it will run from (0 to n-2) for the given loop.
i hope it is clear to you :)
In my interview they asked the below Question,can I get answer for this ....
How can we extract number from each digit and we need digit as a even or odd number
Hey I have a doubt ?????
Thankyou sir ur the best
Welcome
i have encountered this question in interview and i was not able to give the answer so i was rejected. please guide all type of basic program task question which will be asked in interview.
In which company they this asked this question
Thanks a lot sir
Welcome
thank you so much bro
Welcome
helpful video sir
Thanks
Commenting for better reach
public class Even_Odd_from_Array {
public static void main(String args[]) {
int a[] = {2,3,4,5,6,7,8,9};
List even = new ArrayList();
List odd = new ArrayList();
for(int i = 0;i
🇮🇳🇮🇳🙏🙏👍👍
i tried this way
public static void main(String[] args) {
int a[] = {1,2,3,4,5,6,7,8,9,10};
String even = "";
String odd = "";
for(int i = 0; i