1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Firdavs [7]
2 years ago
12

I have to write this in Java, but i've never even learned it before and i'm completely lost

Computers and Technology
1 answer:
Varvara68 [4.7K]2 years ago
7 0

Answer:

private void printArray(int[] arr){   //0

  System.out.print("[");   //1

  for(int k : arr){   //2

     System.out.print(k + ", ");   //3

  }

  System.out.println("]");   //4

}

Explanation:

This method should get you started. Your teacher may want a different format or a different type of loop. If you haven't learned for loops yet don't use them that'd be suspicious ;)

What I did:

0: This is the method heading with one parameter for the 1D array. If you need to access it in a different class change private to public.

1: This prints the [ with no line break

2: This is an enhanced for loop to iterate through each element in a 1D array. Alternatively, a normal for loop looks like this:

for (int i = 0; i < arr.length; i++)

instead of retrieving the variable with the enhanced for, you'd have to use arr[i] instead of k in this scenario.

3: This prints the value in each pass of the loop along with a comma and a space.

4: This adds the ] with a line break when the loop is completed

Hope this helps you get started :D comment if you need further help

You might be interested in
Which of the following is the largest unit of information?
Mila [183]
What are the choices?

5 0
3 years ago
Read 2 more answers
You can drag a cell to a new location by pointing to the cell border until the pointer displays a _______ arrow, and then draggi
Marina CMI [18]

The answer for the blank space given in the question is a type of arrow called four-headed arrow.

Four-headed arrow can be found in many computer software and applications, including in Microsoft Excel. Generally, <u>it is used to move an object from one place to another.</u> In the given scenario described at the question, it is used to move a cell from one location to another.

3 0
2 years ago
Read 2 more answers
1. Explain the difference between a web browser and a search engine. (2 points)
Elan Coil [88]

Answer:

1. A browser is used to access websites and web pages whereas a search engine is used to search for particular information.

2. Indexing is the process by which search engines organise information before a search to enable super-fast responses to queries.

3.Search engines are used to find specialized data rapidly whereas web directory is used to find a list of different sites.

4. The working behind the PageRank algorithm is that a page with a large number of in- links(a link from an important page) to it, then its outgoing links to other pages also become important. It gives more importance to back links of a web page and propagates the ranking through links.

5. Look for Sites from Established Institutions 2. Look for Sites with Expertise 3. Steer Clear of Commercial Sites 4. Beware of Bias 5. Check the Date 6. Consider the Site's Look 7. Avoid Anonymous Authors 8. Check the Links

Explanation:

5 0
3 years ago
You give an object a more meaningful name by setting the object’s _________________ property.
viva [34]

Answer:

The correct answer to this question is "Name".

Explanation:

In the programming language, the object is a part of the object-oriented programming language (oops).In all (oops) programming language we use class and object. where class is a collection of data member and member function, and object is a real-world entity. An Object is an instance of a Class. When a class is created, no memory is assigned but when we create the object of the class then memory is allocated.

In this question except option (d), all options are wrong.

7 0
2 years ago
What can be can be considered data
gavmur [86]

Answer:

The amount of data you use while talking on a phone is a form of data.

Explanation:

8 0
3 years ago
Other questions:
  • In mathematics, the factorial of a positive integer n, denoted as n! , is the product of all positive integers less than or equa
    10·2 answers
  • O novo funcionário da equipe de desenvolvimento de sistemas está aprendendo os termos mais utilizados no dia a dia da empresa. A
    7·1 answer
  • Create a program that includes a function called toUpperCamelCase that takes a string (consisting of lowercase words and spaces)
    9·1 answer
  • Select the correct answer.
    6·1 answer
  • Write a brief, two-page paper describing how your lifestyle and values impact your use of the Web for e-commerce. How is your on
    15·1 answer
  • HELLO <br> any edmentum people out there.
    15·2 answers
  • Alayna is researching information online to write her essay about the Berlin Wall.
    8·1 answer
  • Microsoft recommends when that you create passwords with upper and lowercase letters, numbers, symbols, and use at least _______
    5·1 answer
  • Pleaseeeee helpppppppp​
    7·1 answer
  • in a small town, there are two providers of broadband internet access: a cable company and the phone company. the internet acces
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!