Question

In: Computer Science

Write the code to create an array named movies and store three of your favorite movies...

Write the code to create an array named movies and store three of your favorite movies in the array. Only provide the array and code needed to put the movie names in the array. Do not include additional code

Solutions

Expert Solution

hey there ! i am done with the code using java ,, Please give me a like to appreciate my work and efforts ,,your like means a lot !

here is the syntax for array declaration -

Type arrayname[]=new Type[size];

for example -

String array[]=new String[3];

here is the code and snapshot of the output ---

public class Arraycheck {

public static void main(String args[])
{
//declaring and initializing an array type of string to store the movies name :
String array[]=new String[3];
  
//storing the movies name by manually --
array[0]="MSD";
array[1]="DILBechara";
array[2]="Kaipoche";
  
//print the array :
  
for(int i =0;i<array.length;i++)
{
System.out.println(array[i]);
}
  
}
  
}

and snapshot ---

Thank You !


Related Solutions

5. Create an HTML file that uses an array to store links for your three favorite...
5. Create an HTML file that uses an array to store links for your three favorite websites. Use a for loop to display each link URL within an alert dialog box. I would like to see the HTML page displaying the message.
JAVASCRIPT Create an array of 5 objects named "movies" Each object in the movies array, should...
JAVASCRIPT Create an array of 5 objects named "movies" Each object in the movies array, should have the following properties: Movie Name Director Name Year Released WasSuccessful (this should be a boolean and at least 2 should be false) Genre Loop through all of the objects in Array If the movie is successful, display all the movie information on the page. These movies were a success: Title: Forrest Gump Year Realeased: 1994 Director: Robert Zemeckis Genre: Comedy
Create a class named RemoveDuplicates and write code: a. for a method that returns a new...
Create a class named RemoveDuplicates and write code: a. for a method that returns a new ArrayList, which contains the nonduplicate elements from the original list public static ArrayList removeDuplicates(ArrayList list) b. for a sentinel-controlled loop to input a varying amount of integers into the original array (input ends when user enters 0) c. to output the original array that displays all integers entered d. to output the new array that displays the list with duplicates removed Use this TEST...
Instructions 1. Create a class named after your favorite object in the whole world. For example,...
Instructions 1. Create a class named after your favorite object in the whole world. For example, if you love pizza, then create a class called Pizza.java. This class should not have a main method (1 point) 2. Create Instance Variables (attributes) (2 point) Create at least 3 private instance fields (attributes) for your class You must use at least 3 different data types for your fields 3. Create getter (accessor) and setter (mutator) methods   Create a getter (accessor) method for...
Declare and initialize an array to store the course name or code.
Declare and initialize an array to store the course name or code.
In java language how would I write the following? Create an array called “boyNames” and store...
In java language how would I write the following? Create an array called “boyNames” and store all names from the BoyNames.txt file Similarly, create an array called “girlsNames” and store all names from the GirlNames.txt file Create a text menu that allowing users to:          1. Enter a name and the application must display a message indicating if the name is   among the most popular (found on either array) If the name is found, tell the user if it is a boy’s...
Create a class named Billing that includes three overloaded computeBill() methods for a photo book store....
Create a class named Billing that includes three overloaded computeBill() methods for a photo book store. • When computeBill() receives a single parameter, it represents the price of one photo book ordered. Add 8% tax, and return the total due. • When computeBill() receives two parameters, they represent the price of a photo book and the quantity ordered. Multiply the two values, add 8% tax, and return the total due. • When computeBill() receives three parameters, they represent the price...
Create a class named Billing that includes three overloaded computeBill() methods for a photo book store....
Create a class named Billing that includes three overloaded computeBill() methods for a photo book store. • When computeBill() receives a single parameter, it represents the price of one photo book ordered. Add 8% tax, and return the total due. • When computeBill() receives two parameters, they represent the price of a photo book and the quantity ordered. Multiply the two values, add 8% tax, and return the total due. • When computeBill() receives three parameters, they represent the price...
"Write in swift code only please, Create a SwiftUI project named DogBreeds based on the Contacts...
"Write in swift code only please, Create a SwiftUI project named DogBreeds based on the Contacts app. The app should be named DogBreeds. The app will display 10 dog images and names in a list"
A customer in a grocery store is purchasing three items. Write the pseudo code that will:...
A customer in a grocery store is purchasing three items. Write the pseudo code that will: • Ask the user to enter the name of the first item purchased. Then ask the user to enter the cost of the first item purchased. Make your program user friendly. If the user says the first item purchased is milk, then ask: “What is the cost of milk.” [This should work no matter what item is entered by the user. I might buy...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT