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]
3 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]3 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
Ms. Troy would like you to make a copy of an outfit that she owns and really likes—a sleeveless dress with a short-sleeve jacket
Contact [7]
3.d
5.c
8.a
9.b
10.b

 just took the exam ... hope it helps

3 0
3 years ago
Read 2 more answers
When did color photography begin? early 1800s , mid 1800s , early 1900s , the 1940s
Flura [38]

early 1900s is your answer

3 0
4 years ago
I am the biggest and most important part of data storage hardware. I am about the size of a small book and store critical things
inn [45]

Answer:

HDD (Hard drive disk) or SSD (Solid state drive)

Explanation:

8 0
2 years ago
PLEASE HELP!!! ILL MARK BRAINLIEST!!
xz_007 [3.2K]

Answer:

1. Copyright.

2. Trademark.

3. Patent.

Explanation:

A patent can be defined as the exclusive or sole right granted to an inventor by a sovereign authority such as a government, which enables him or her to manufacture, use, or sell an invention for a specific period of time.

Generally, patents are used on innovation for products that are manufactured through the application of various technologies.

An intellectual property can be defined as an intangible and innovative creation of the mind that solely depends on human intellect.

Simply stated, an intellectual property is an intangible creation of the human mind, ideas, thoughts or intelligence. They include intellectual and artistic creations such as name, symbol, literary work, songs, graphic design, computer codes, inventions, etc.

Basically, the three (3) main ways to protect an intellectual property is to employ the use of the following;

1. Copyright: protects the specific expression of a creation.

2. Trademark: protects signs, symbols, names, or short phrases that reveal the origin of a product or service.

3. Patent: protects the idea underlying a creation.

7 0
3 years ago
A user in a small office environment explains to you that his office implements a small Microsoft workgroup. Users commonly shar
Sphinxa [80]

65 DAC is the access control model is represented in the example where a user explains to you that his office implements a small Microsoft workgroup.

<h3>What is DAC?</h3>

DAC is a Microsoft dynamic access control is a tool for governing data in Windows server 2012. It helps in administering the access control settings of the device.

Thus, 65 DAC is the model that is used to represent the example in which a user explains to you that his office implements a small Microsoft workgroup.

Learn more about DAC

brainly.com/question/20216206

#SPJ1

6 0
2 years ago
Other questions:
  • Websites using www showed up on the internet for the first time in -992
    9·1 answer
  • when the programmers embed a javascript code within html code they place the javascript code between​
    7·2 answers
  • Which of the following indicates what a reply to all function does in most email programs
    8·1 answer
  • When you use the Filter feature, what appears in each column label
    11·1 answer
  • Daniel owns a construction company that builds homes. To help his customers visualize the types of homes he can build for them,
    6·1 answer
  • True / False<br> Generally, more orthogonal instruction sets are considered less elegant.
    10·1 answer
  • 1. Write a program that uses String method regionMatches to compare two strings input by the user. The program should prompt the
    8·1 answer
  • Which statement is true for rapid prototyping? (A. It creates a two-dimensional model of a part or a product, from the original
    8·2 answers
  • In what situation is a read receipt notification not sent when an email is opened or previewed bya recipient?
    8·2 answers
  • Which component of the computer keeps the operating system when the computer is running​
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!