Finding error in code sequence

Assignment Help Software Engineering
Reference no: EM1378927

This code prints all elements of the array geo for ( int i = 0; i < geo.length; i++ )
{
//the code is missing here

}
________
Where is the error in this code sequence?
// a is an ArrayList of strings
// a has already been declared and instantiated
a.size ( ) = 10;
__

You coded the following in the Test.java class:
public static void main (string) [ ] args)
{
// cars is an ArrayList of Auto Objects
// cars has already been declared and instantiated
for ( Auto a ; cars ) // line 12
{
System.out.println (a. to string ( ) );
} // line 15
} //line 16
When you compile, you get the following message:
Test.java:12 '; 'expected
for ( Auto a ; cars ) // line 12
^
1 error
Describe what the problems are and how to fix them.

Reference no: EM1378927

Questions Cloud

Microsoft word and powerpoint presentation : Assume A friend of you has just started using M.S. Word, and has e-mailed you requesting instructions on how to apply a first line indent to a paragraph. Construct a list of instructions about how to configure a 1st line indent for a paragraph.
Finding output of the code sequence : Construct the pseudocode for a program that finds the sums of the numbers input that are greater than or equal to 10 and the numbers input that are less than ten.
Program to calculate the average salary and years employed : Construct a program that determines how many consonants are in an entered string of fifty characters or less. Output the entered string and the number of consonants in the string.
Explanations on fixing c++ code errors : This technique takes an array of ints as a parameter and returns an array of Booleans. For each element in the parameter array whose value is 0,
Finding error in code sequence : This code prints all elements of the array geo for, Describe what the problems are and how to fix them.
Explain and fix java code errors : The code compiles properly, but when you run, you get the following output, Exception in thread "main" java.land.IndexoutBoundsException:
Fixing errors for java code : The code compiles properly and runs, but result is not what you expected; output is similar to the following, Describe what the problem is how to fix it.
Programming frameworks besides asp.net : Name three other web programming frameworks besides ASP.NET. Explain the ways that ASP.NET is different than other web programming frameworks.
Effect of the time step on stability and accuracy : For each case of each method, plot the velocity profile for four difference times on the same graph - Write a code to solve this problem for the schemes and conditions.

Reviews

Write a Review

Software Engineering Questions & Answers

  Explain tool used to infer the conceptual model

Another tool used to infer the conceptual model are the end user's forms. The form below will help you identify the entities and relationships.

  Create eer model using visio notation or supertypes notation

Create an EER model for the following situation using the traditional EER notation, Visio notation or supertypes notation.

  Design an eer diagram for ciuntry club

Once a person becomes a member of any type, information about them as guests is no longer important to retain. Design an EER diagram for this situation.

  How project visualization maps to architectural views

Choose one of the agile software development methodologies/processes and explain how changes can be managed in software development projects. Describe how project visualization maps to architectural views.

  Fixing errors for java code

The code compiles properly and runs, but result is not what you expected; output is similar to the following, Describe what the problem is how to fix it.

  Explain the characteristics of visual studio 2005

Explain the characteristics of Visual Studio 2005.

  Draw e-r diagram for doctors prescribe drugs for patients

Draw an E/R diagram for the following situation: Doctors prescribe drugs for patients. A given doctor can prescribe many drugs for a certain patient.

  Write z schemas defining state of atm operation system

Using your knowledge of ATM operation, write Z schemas defining the state of the system, card validation (where the user's identifier is checked) and cash withdrawal.

  Build an entity relationship diagram for hospital

Build an Entity Relationship Diagram(ERD) for the following hospital scenario. For your Patient entity show its attributes . Highlight the key attribute in red.

  Draw flow chart to compute arithmetic operation

While drawing flow chart, you require to add little more functionality as follows like during any computations of any arithmetic operation, if result exceeds 2000 or comes equal to 100, user must input the data again

  Describing arrow points to object in communication diagram

Why would you design a communication diagram instead of sequence diagram? Describe what the arrow which points to the object in a communication diagram signifies.

  Er diagram to monitor students-write desirable constraints

Represent entire scenario with the help of ER Diagram. Also write desirable constraints and justify your design approach even in a single small step.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd