Answer:
import java.util.*;
public class MyClass {
public static void main(String args[]) {
Scanner input = new Scanner(System.in);
System.out.print("Input a word: ");
String userinput = input.nextLine();
for(int i =0;i<userinput.length();i+=2) {
System.out.print(userinput.charAt(i));
}
}
}
Explanation:
This line prompts user for input
System.out.print("Input a word: ");
This declares a string variable named userinput and also gets input from the user
String userinput = input.nextLine();
The following iterates through every other character of userinput from the first using iteration variable i and i is incremented by 2
for(int i =0;i<userinput.length();i+=2) {
This prints characters at i-th position
System.out.print(userinput.charAt(i));
Answer: Scope resolution operator(::)
Explanation: A member function and the constructor can be called within the function easily but for the execution of the these components outside the class , a special operator is required to call the functions. The scope resolution operator(::) preceding with the name of class is thus used for defining of the function outside class.This operator maintains the cope of the function and constructor outside the class.
Answer: The answer is anonymity
Explanation: i had the same question on my test.
Because there fun and helps boys get together or to get ur mind off of stuff
its not simple nothing never is deleted from online posts or photos