Answer:
- public class FindDuplicate{
-
- public static void main(String[] args) {
- Scanner input = new Scanner(System.in);
-
- int n = 5;
- int arr[] = new int[n];
-
- for(int i=0; i < arr.length; i++){
- int inputNum = input.nextInt();
- if(inputNum >=1 && inputNum <=n) {
- arr[i] = inputNum;
- }
- }
-
- for(int j =0; j < arr.length; j++){
- for(int k = 0; k < arr.length; k++){
- if(j == k){
- continue;
- }else{
- if(arr[j] == arr[k]){
- System.out.println("True");
- return;
- }
- }
- }
- }
- System.out.println("False");
- }
- }
Explanation:
Firstly, create a Scanner object to get user input (Line 4).
Next, create an array with n-size (Line 7) and then create a for-loop to get user repeatedly enter an integer and assign the input value to the array (Line 9 - 14).
Next, create a double layer for-loop to check the each element in the array against the other elements to see if there is any duplication detected and display "True" (Line 21 - 22). If duplication is found the program will display True and terminate the whole program using return (Line 23). The condition set in Line 18 is to ensure the comparison is not between the same element.
If all the elements in the array are unique the if block (Line 21 - 23) won't run and it will proceed to Line 28 to display message "False".
Answer:
D.
The player uses a joystick to control the character.
Explanation:
The MEANING of operation is: "The fact or condition of functioning or being active."
This explains that the answer is D because you are using the joystick to control the character. Hope the helps.
A statement which best describes the types of products and services that are suitable for online sale is: D. Not all products or services are well-suited for sale on the Internet.
<h3>What is e-commerce?</h3>
E-commerce is also referred to as an online sale and it can be defined as a business model which is designed and developed to involve the buying and selling of goods (products) over the Internet.
Basically, e-commerce technologies are designed and developed to comprises software and information technology (IT) systems which typically support safe and secure transactions over network and the Internet, so as to make e-commerce possible.
<h3>What is a product?</h3>
A product can be defined as any physical object (tangible item) that is typically produced by a manufacturer so as to satisfy and meet the demands, needs or wants of every customer. Some examples of a product include the following:
In conclusion, we can infer and logically deduce that it is not all products or services that are well-suited for sale on the Internet through e-commerce.
Read more on e-commerce here: brainly.com/question/23369154
#SPJ1
Answer:
C
Explanation:
best option for the available answers