Answer:
/ReversedEvenOddString.java
import java.util.Scanner;
public class ReversedEvenOddString {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.nextLine();
String evens = "";
String odds = "";
for(int i = s.length()-1;i>=0;i--){
if(i%2==1){
odds += s.charAt(i);
}
else{
evens += s.charAt(i);
}
}
String res;
if(s.length()%2==1){
res = evens+odds;
}
else{
res = odds+evens;
}
System.out.println(res);
}
}
Answer:
Arrays are described as immutable because they cannot be changed once they are defined. (D on Edge)
Explanation:
It's in the notes and I just took the test (2020)
Answer:
Kindly find the code snippet in the explanation written in kotlin language
Explanation:
fun main(args: Array<String>) {
var num:Int
println("Enter a num")
num= Integer.valueOf(readLine())
for(i in num downTo 1){
if(i==num){
print("Ready!")
print(" ")
}
print(i)
print(" ")
if(i==1){
print(" ")
print("Go!")
}
}
}
This function too can also work
fun numTo(num:Int){
if (num>0) for(i in num downTo 1) print("$i ")
println("Go!")
Answer:
A still
Explanation:
This is the only answer that makes sense, a dialogue is words, sound element is well sound, and an animation would be moving.
Dang, that's cool, but nobody really cares that you two have something going online