About Question enthuware.ocpjp.v7.2.1255 :

All the posts and topics that contain only an error report will be moved here after the error is corrected. This is to ensure that when users view a question in ETS Viewer, the "Discuss" button will not indicate the presence of a discussion that adds no value to the question.

Moderators: Site Manager, fjwalraven

Post Reply
ewebxml
Posts: 77
Joined: Sun Jun 30, 2013 10:04 pm
Contact:

About Question enthuware.ocpjp.v7.2.1255 :

Post by ewebxml »

The method contains 1 too many end braces: (that is, unmatching braces)
The code currently contains 3 ending braces.
I understand that the third ending brace represents the ending brace for the containing class.

Should be:

Code: Select all

public void readData(String fileName) throws Exception {        
  try(FileReader fr1 = new FileReader(fileName)){             
    Connection c = getConnection();             
    //...other valid code         
  }     
}     
-----
OR

Code: Select all

public class TestClass{
  public void readData(String fileName) throws Exception {        
    try(FileReader fr1 = new FileReader(fileName)){             
      Connection c = getConnection();             
      //...other valid code         
    }     
  }     
}

admin
Site Admin
Posts: 10389
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocpjp.v7.2.1255 :

Post by admin »

Fixed.
thank you for your feedback!

Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests