Why do you write ‘Integer.parseInt(br.readLine())’?

1 Answer

Answer :

A: The inputs in a java program comes in the form of String objects which are read using the br.readLine() function. Now if we want the input in integer form, we have to convert it into integer using the parseInt() function of the Integer wrapper class.

Related questions

Description : Rewrite the following code using switch case: int day=Integer.parseInt(jTextField1.getText()); -Technology

Last Answer : int day=Integer.parseInt(jTextField1.getText());switch(day){case 1:case 2:case 3:case 4:case 5:jOptionPane1.showMessageDialog(this, 'Working Day'); break;case 6:case 7:jOptionPane1.showMessageDialog(this, 'Off Day'); break;default:jOptionPane1.showMessageDialog(this, 'Invalid Entry');}

Description : What is the function of readLine() method?

Last Answer : A: readLine() method reads a line of text (which you input) and returns the result in the form of a String.

Description : Why do you write BufferedReader br = new ……. ?

Last Answer : A: To activate the Buffer memory for efficient input and output operations. ‘br’ is an object of the BufferedReader class.

Description : ........... is compulsory part of HTML. A) B) C) D)

Last Answer : B)

Description : Which is not a typical program control instruction? (A) BR (B) JMP (C) SHL (D) TST

Last Answer : (C) SHL

Description : Python Pickle Load TypeError: file must have 'read' and 'readline' attributes -Web-Development

Last Answer : answer:

Description : If a variable is declared final, it must include ...................... value. A) integer B) no C) initial D) float

Last Answer : C) initial

Description : Which of the following control expressions are valid for an if statement? A) An integer expression B) A Boolean expression C) Either A or B D) Neither A nor B

Last Answer : B) A Boolean expression

Description : Which of the following control expressions are valid for an if statement? A) An integer expression B) A Boolean expression C) Either A or B D) Neither A nor B

Last Answer : B) A Boolean expression

Description : A method name myMethod( ) that needs two integer arguments is declared as A) public void myMethod( ); B) public void myMethod(int a, int b); C) public void myMethod(int a, b); D) public int myMethod(a, b);

Last Answer : B) public void myMethod(int a, int

Description : Which of the following control expressions are valid for an if statement? A) an integer expression B) a Boolean expression C) either A or B D) Neither A nor B

Last Answer : B) a Boolean expression

Description : If an integer occupies 4 bytes and a character occupies 1 byte of memory, each element of the following structure would occupy how many bytes ? struct name { int age; char name[30]; }; A) 30 B) 32 C) 34 D) 36

Last Answer : C) 34

Description : An integer constant in C must have A) At least one digit B) At least one decimal point C) A comma along with digits D) Digits separated by commas

Last Answer : A) At least one digit

Description : If a is an integer variable, a=7/3; will return a value A) 2.5 B) 3 C) 0 D) 2

Last Answer : D) 2

Description : NULL is (A) the same as 0 for integer (B) the same as blank for character (C) the same as 0 for integer and blank for character (D) not a value

Last Answer : (D) not a value

Description : What is the data type of (1)? a) Tuple b) Integer c) List d) Both tuple and integer

Last Answer : b) Integer

Description : Bresenham line drawing algorithm is attractive because it uses (A) Real arithmetic only (B) Integer arithmetic only (C) Floating point arithmetic (D) Real and integer arithmetic

Last Answer : (B) Integer arithmetic only

Description : The correct way to round off a floating number x to an integer value is (A) y = (int)(x+0.5) (B) y = int(x+0.5) (C) y = (int)x+0.5 (D) y = (int)((int)x+0.5)

Last Answer : (A) y = (int)(x+0.5)

Description : A computer program selects an integer in the set {k : 1 ≤ k ≤ 10,00,000} at random and prints out the result. This process is repeated 1 million times. What is the probability that the value k = 1 appears in the printout atleast once ? (A) 0.5 (B) 0.704 (C) 0.632121 (D) 0.68

Last Answer : (C) 0.632121

Description : Suppose the function y and a fuzzy integer number around -4 for x are given as y=(x-3)2+2 Around -4={(2,0.3), (3,0.6), (4,1), (5,0.6), (6,0.3)} respectively. Then f(Around - 4) is given by: (A) {(2,0.6), (3,0.3), ... 6), (3,1), (6,0.6), (11,0.3)} (D) {(2,0.6), (3,0.3), (6,0.6), (11,0.3)}

Last Answer : (C) {(2,0.6), (3,1), (6,0.6), (11,0.3)}

Description : Consider the following database table : Create table test( one integer, two integer, primary key(one), unique(two), check(one≥1 and ≤10), check(two≥1 and ≤5) ); How many data records/tuples atmost can this table contain ?  (A) 5 (B) 10 (C) 15 (D) 50

Last Answer : (A) 5 

Description : If there are n integers to sort, each integer has d digits and each digit is in the set {1,2, ..., k}, radix sort can sort the numbers in: (A) O(d n k) (B) O(d nk) (C) O((d+n)k) (D) O(d(n+k))

Last Answer : (D) O(d(n+k))

Description : A three dimensional array in C' is declared as int A[x][y][z]. Here, the address of an item at the location A[p][q][r] can be computed as follows (where w is the word length of an integer): (A) &A[0][0][0]+w(y*z*q+z*p+r) (B) &A ... *q+r) (C) &A[0][0][0]+w(x*y*p+z*q+r) (D) &A[0][0][0]+w(x*y*q+z*p+r)

Last Answer : Answer: B

Description : In a relational database model, NULL values can be used for all but which one of the following? (A) To allow duplicate tuples in the table by filling the primary key column(s) with NULL. (B) To ... D) To fill a column in a tuple when that column does not really exist for that particular tuple.

Last Answer : (A) To allow duplicate tuples in the table by filling the primary key column(s) with NULL.

Description : Write the expansions of the following tags used in HTML. 1. -Technology

Last Answer : 1. — Break line2. — Italic3. – Horizontal Rule4. — Underline

Description : Write the purpose of HTML. Distinguish between tag and tag. -Technology

Last Answer : HTML is used to represent page, data on website with proper manner and attractive look to get maximum users.Difference between tag and tagtag is a block level element, and is mainly used to add content, whereas the tag is used to force a line break within the element.

Description : Content: and tags in HTML Of two The end Tags To write Is No. Why ?

Last Answer : and tags Of two The end Tags To write Is No. Because - all this Of the tag No The end Tags Stays No. And These No Element too Stays No. and tags Two Empty (empty) tag too Says

Description : Write the given sets in roster form: (a). P = {y: y is an integer and -4 < y < 6}. (b). Q = {y: y is a natural number which is

Last Answer : (i) A = {x: x is an integer and †3 < x < 7} The elements of this set are †2, †1, 0, 1, 2, 3, 4, 5, and 6 only. Therefore, the given set can be written in roster form as A = {†2, †... and 80 only. Therefore, this set can be written in roster form as C = {17, 26, 35, 44, 53, 62, 71, 80}}.

Description : What is the integer of A gain of 5 yards on the first down write integer that is represented in statement?

Last Answer : 5

Description : What is the integer of A gain of 5 yards on the first down write integer that is represented in statement?

Last Answer : 5

Description : How do you write 500 percent as an integer?

Last Answer : 500% as an integer or whole number is 5

Description : Write transfer function of op amp as an integer.

Last Answer : The transfer function of the integer is  LAL=1/MR1cf

Description : Write a C++ program to swap two integer numbers and swap two float numbers using function overloading.

Last Answer : #include<iostream.h> #include<conio.h> void swap(int a,int b) { int temp; temp=a;  a=b;  b=temp; cout<<"\nInteger values after swapping are:"<<a<<" "< ... { clrscr(); swap(10,20); swap(10.15f,20.25f); getch(); }

Description : Write a program to swap two integer values by using call by reference.

Last Answer : #include #include void swap(int *a,int *b) { int c; c=*a; *a=*b; *b=c; } void main() { int a,b; couta; coutb; cout

Description : What does "BR" stand for on the temperature dial of my oven?

Last Answer : Broil is correct…. put it on and you should see the top burner turn on

Description : Can I use Br.Bonners dish water directly on plants?

Last Answer : Try it on one plant you are not particularly fond of. I dumped some water from an empty milk bottle I was rinsing out; the plant did not flourish.

Description : my vanda orchided looks dried up, can it br revived

Last Answer : Need Answer

Description : What word starting with BR, that with the addition of the letter E, becomes another word that sounds the same as the first? -Riddles

Last Answer : Braking becomes Breaking.

Description : Difference between and tags. -Technology

Last Answer : tag is used to insert a line break which means the text/image following the tag will be moved to the next line while tag is used to insert horizontal line that can divide the information into sections.

Description : Distinguish between tag and tag with the help of an example. -Technology

Last Answer : Distinguishing between tag and tag are as follows: tag tagIt is a container element.It is an empty element.It is used to define a paragraph ofthe text on the Web page.It is used to insert line break.It ... no attribute.e.g. This ts a paragraph.e.g.This is a 1 line break into the Web document.

Description : What is the atomic number of Br ?

Last Answer : The atomic number of Br is 35

Description : What is the full form of BR ?

Last Answer : Bangladesh Railway in full form of BR.

Description : Assertion :- Bromide ion is serving as a reducing agent in the reaction `2MnO_(4)^(-)(aq.)+Br^(-)(aq.)+H_(2)Orarr2MnO_(2)(aq.)+BrO_(3)^(-)(aq.)+2OH^(-

Last Answer : Assertion :- Bromide ion is serving as a reducing agent in the reaction `2MnO_(4)^(-)(aq.)+Br^( ... is False. D. If both Assertion & Reason are False.

Description : In the conversion fo ` Br_2` to `BrO_3^(-)` , the oxidation state of `Br` changes from.

Last Answer : In the conversion fo ` Br_2` to `BrO_3^(-)` , the oxidation state of `Br` changes from. A. 0 to 5 B. 1 to 5 C. 0 to `-3` D. 2 to 5

Description : The reaction `RCH_(2)CH_(2)COOH overset(Red P)underset(Br_(2))toRCH_(2)-underset(Br)underset(|)(C)HCOOH` is called as

Last Answer : The reaction `RCH_(2)CH_(2)COOH overset(Red P)underset(Br_(2))toRCH_(2)-underset(Br) ... reaction C. Reimer Teimann reaction D. Sandmeyer reaction

Description : Compound (A) `C_(8)H_(9)Br`, gives a white precipitate when warmed with alcoholic `AgNO_(3)`. Oxidation of (A) gives an acid (B),`C_(8)H_(6)O_(4)`. (B

Last Answer : Compound (A) `C_(8)H_(9)Br`, gives a white precipitate when warmed with alcoholic `AgNO_(3)`. Oxidation of ... . Identify the compound (A) A. B. C. D.

Description : `CH_(3)CH_(2)-CH_(2)-COOH overset("Red + P" +Br_(2))toCH_(3)-CH_(2)-underset(Br)underset(|)(CH)-COOH` This reaction is called

Last Answer : `CH_(3)CH_(2)-CH_(2)-COOH overset("Red + P" +Br_(2))toCH_(3)-CH_(2)-underset(Br)underset(|)(CH)-COOH` This reaction is called

Description : The acid D obtained through the following sequence of reactions is: `C_(2)H_(5)Br overset(Alc. KOH)rarrA overset(Br_(2))underset(C Cl_(4))rarrBoverset

Last Answer : The acid D obtained through the following sequence of reactions is: `C_(2)H_(5)Br overset(Alc. KOH) ... B. Malonic acid C. Maleic acid D. Oxalic acid

Description : How many sterioisomers does the following compound have ? `CH_(3)-CH_(2)-underset(overset(|)(Br))(C)H-CH_(2)-CH=CH-CH_(3)`

Last Answer : How many sterioisomers does the following compound have ? `CH_(3)-CH_(2)-underset(overset(|)(Br))(C)H-CH_(2)-CH=CH-CH_(3)` A. None B. 2 C. 4 D. 6