Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
javaClassAr
//'main' method must be in a class 'Rextester'. //openjdk version '11.0.5' ////////////////////////////////////////////////////////////////////////////////javaClassAr:Array member in Java class //this code is created by Rezaul Hoque on September 18,2022; //contact:jewelmrh@yahoo.com;Dhaka,Bangladesh;https://rezaulhoque.wordpress.com,https://hoquestake.blogspot.com //note: codes shared by Rezaul Hoque on rextester are not for sale; they are created and shared to facilitate the algorithm learning process; many like Hoque use this platform to practice programming ;Rezaul hopes his contribution helps others to fine tune their learning; ////////////////////////////////////////////////////////////////////////////// import java.util.*; import java.lang.*; class Demo{ int[] k; int[] a; public Demo(){ k=new int[]{10,9,8,15,19,1,3}; a=new int[]{30,41,45,19,15,5,3}; } public void display(){ System.out.println("Index Value"); System.out.println("---------------------"); for(int m=0;m<7;m++){ if(a[m]>a[m+1]){ System.out.printf("%d\t%d\n",k[m],a[m]); } } } } class Rextester { public static void main(String args[]) { Demo s=new Demo(); s.display(); } }
run
|
edit
|
history
|
help
0
LRU cache - Simple solution (costly)
simple date time in java
Coding Challenge - 01 (Even numbers)
Fibonacci numbers 0 - 93
Hi
Fraction implementation using oops in java
regex with %
pow x^n
Abhay
Problem: rstring