• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 1 out of 4 pages
Exam (elaborations)

Mta Java Questions And Correct Answers 2022

Document preview thumbnail
Preview 1 out of 4 pages

MTA Java QUESTIONS AND CORRECT ANSWERS 2022getMessage Displays details of an exception IOException Occurs when a file being read from does not exist getStackTrace Returns an array of stack trace elements InputMismatchException Occurs when an incorrect data type is entered or read IllegalArgumentException Thrown by a method to indicate an illegal or inappropriate argument. IInt(args[0]); Converts a string of data to a whole number. protected method Can be called by any subclass within its class, but not by unrelated classes (same package only) private method can only be accessed by methods of the same class, is usually a helper method, and can never be a constructor ArrayL(i) a method of ArrayList class used to return the i item within an ArrayList. ArrayLe(i) a method of ArrayList class used to remove i item from an ArrayList and moves all following values up one space. conversion errors errors that arise form converting statements from one (non-equivalent) form to another (ie: setting a double to equal an integer). javac command loads a Java class from the command line java command runs a Java class from the command line (can contain raw numbers, no commas or percent symbols) SEmpty() Method checking if a String is empty (no null method) Byte Contains numbers from -128 to 127 Double 64 bit numbers with decimal points Long 64-bit whole number, pretty large Float Numbers whose decimals have the letter 'f' after it (also loses precision in a calculation) try-catch-finally block code from a try block that throws an exception will look for a corresponding catch block with code that handles the exception. Optionally a finally statement can be added to run clean-up code independent of the try-catch outcome. (One try can have either; There can be multiple catch blocks) static Argument that cannot be changed when declaring the main method; It takes one space in memory; (for a class to be called from a _______ method, it too must be ______, or runtime error ) printf A method of the System class that is capable of outputting formatted text. %d returns an integer as a decimal value %,d separates an integer with a comma as a thousands' separator .Scanner Loads the library to allow the user to take information into the code Scanner scan = new Scanner(S); Creates a Scanner object "scan" () Closes the scanner to prevent resource leaks ScannerT(ScannerT) Example of an error caused by a mismatch of data types while testing the Scanner utility, not in a "scanner" method (Checked exception) BString(); Converts a boolean to a String do-while loop repeatedly executes a block of statements until a specified Boolean expression evaluates to false. ternary conditional a shortened version of an if/else statement that returns a value based on the value of a Boolean expression (condition ? true : false) continue; keyword to skip a loop iteration break; keyword to exit a loop completely initial array usually empty as part of a main method nextLine the Scanner class's ______ method reads a line of input, and returns the line (or the remaining part of it) as a string Iterator an object containing data and methods to iterate through a collection of data, allowing processing of one data item at a time. Integer object declared for an integer to be used in an ArrayList immutable unchangeable (String property) DDouble(string) Converts a String to a double Nested branches The nested branches can tak


Document information

Uploaded on
November 27, 2022
Number of pages
4
Written in
2022/2023
Type
Exam (elaborations)
Contains
Questions & answers
$8.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
BravelRadon
3.5
(166)
Sold
974
Followers
542
Items
55122
Last sold
1 week ago




Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions

Whoops! We can’t load your doc right now. Try again or contact support.