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

1 Answer

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');}

Related questions

Description : Rewrite the following code using for loop: int attempt=0; -Technology

Last Answer : for(int attempt=0;attempt

Description : Rewrite the following code using switch statement : -Technology

Last Answer : Given code using switch statement :switch (code){case A ;allowance = 3500 ;break ;case B ;allowance = 3200 ;break ;default ;allowance = 2000 ;break ;}

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

Last 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.

Description : Rewrite the following code using WHILE loop : -Technology

Last Answer : int x = 100 , i = 2;while (i < = 22){jTextAreal . append(' '+(i + x) ) ;x = x - 2 ;i = i + 4;}

Description : Find error(s) in the following HTML code segment. Rewrite the correct code. -Technology

Last Answer : There should be type instead of style. So, correct line is

Description : The following code has error(s). Rewrite the correct code underlining all the corrections made : -Technology

Last Answer : int start=2,end=20; //Correction 1do //Correction 2{start=start+start;} //Correction 3while(start

Description : The following code has error(s). Rewrite the correct code underlining all the corrections made : -Technology

Last Answer : int n=5 , int i=l . f=l ;do{f = f 8 i;i ++;}while (i

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 : 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 : 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 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 : What will be an output of the following code if value of variable application is 1? switch(application) -Technology

Last Answer : The output is:OS

Description : Single and double are the types of (a) Integer data type (b) Decimal numbers -Technology

Last Answer : (d) Date/Time will be the data type because it allows storing date and time format.

Description : An integer takes a storage size of (a) 2 bytes (b) 1 byte -Technology

Last Answer : (a) An integer takes a storage size of 2 bytes.

Description : It is not important to specify an integer value as the width of the border of an image. -Technology

Last Answer : False Width takes an integer values that are in pixels.

Description : To completely write the program in FORTRAN and rewrite the 1% code in assembly language, if the project needs 13 days, theteam consists of ? 13 programmers 10 programmers 8 programmers 100/13 programmers

Last Answer : 10 programmers

Description : How many times will the loop execute? int value1 = 7. value2=19 ; do -Technology

Last Answer : 4 timeswill the loop execute.

Description : 1. We must hold fast to constitutional methods. (Rewrite using a modal auxiliary showing ‘necessity)

Last Answer : 1. We must hold fast to constitutional methods. (Rewrite using a modal auxiliary showing necessity) ... that' and rewrite as a complex sentence)

Description : 1. The author thought that he would have some time for farming. (Rewrite using the Infinitive of the underlined gerund)

Last Answer : 1. The author thought that he would have some time for farming. (Rewrite using the Infinitive of ... it were the adivasis. (Rewrite removing who')

Description : int the case of a zombie apocalypse, what is the most useful weapon you could craft using everyday household items?

Last Answer : Armor made of books

Description : Compression method use for Integer type data a. Huffman b. LZ77 c. Golomb Code d. Adaptive Huffman

Last Answer : c. Golomb Code

Description : Status bar is primarily used to switch between open windows and applications. -Technology

Last Answer : FalseStatus bar is not used to switch between open windows and applications but it simply shows the status of currently running applications.

Description : What is the method of using comment line in the HTML code? -Technology

Last Answer : In HTML code, the comment line is declared as

Description : Write the code given below using ‘for’ loop instead of ‘while’ loop : -Technology

Last Answer : The given code using ‘for’ loop instead of ‘while’ loop :int ifor (i = 1 ; i < = 5 ; i + +){if (1 * i = = 4)jTextFieldl. setText ( “ “ + i) ;}

Description : Rewrite in exponential form?

Last Answer : answer:Okay, couple of hints to get you going in the right direction. Somebody has probably taught you that √x is the same thing as x^(½) (if not, then I just did). This rule applies for other roots of ... of info you should be able to get to the final answer, but let me know if you want more help.

Description : Game: Would you like to rewrite a child's rhyme to reflect adult issues?

Last Answer : answer:Here's mine: I am Sam. Sam I am. Do you like diazepam? I do, I like diazepam. And I will take it out of stress And I will take when head's a mess And I will take it when I fear And I will take ... it here or there Hell, I will take it anywhere! I do so like diazepam I do, I like it, Sam I Am.

Description : Rewrite : What thirst quenching,lip smacking,delicious non alcoholic drinks would you recommend for a party of teetotalers?

Last Answer : Coke Zero. Tastes great, and there’s no guilt involved.

Description : How to find articles, Rewrite articles and what are rules I should follow?

Last Answer : How old are you? Don’t they teach things like this in high school anymore?

Description : Rewrite. If Elvis Presley had lived he'd have been 75 today. What do you think he would have done with the rest of his life had he lived?

Last Answer : Elvis was one of our great 20th century artists, but given the road along which he had been led (or dragged), I doubt he would have aged gracefully-either physically or professionally. If ... was under and pursue his passions including acting, he might currently be enjoying a happy, fulfilled life.

Description : You can rewrite any movie/TV show you want to add or remove whatever you want—what movie/show are you choosing and what are you changing?

Last Answer : I would fix the ending to how I met your mother

Description : You can rewrite any movie/TV show you want to add or remove whatever you want—what movie/show are you choosing and what are you changing?

Last Answer : I would fix the ending to how I met your mother

Description : Here are some false statements. Identify the mistakes and rewrite them correctly. -SST 10th

Last Answer : (a) Multiplying urban centres with large and dense populations and urban lifestyles have caused the over exploitation of water resources. These urban centres require land and so, a lot of forest ... state. Now, as water is easily available, the residents are less dependent on rainwater harvesting.

Description : Which phrases/sentences in the text do you find difficult to understand? Select a few and guess the meaning of each. Rewrite a simple paraphrase of each. -English

Last Answer : Came into the nice division – The category of nice people. Masculine habitation. – The room seemed to suggest that there lived some male persons there. “Bertie, why do you bound? – Bound means ‘jump’. But here it means a person whose behaviour is unpleasant to other people.

Description : rewrite the equation 4x + 4y = 20 in slope-intercept form. -General Knowledge

Last Answer : 4x + 4y = 20 written in slope-intercept form is y = -x + 5. 4x + 4y = 20 4y = -4x + 20 (4y = -4x + 20)/(4) y = -x + 5.

Description : how do you rewrite 8x8x8x8x8 as a exponent?

Last Answer : 8^5

Description : If I only get an appointment later, what happens?

Last Answer : "Nothing in heaven. This deadline is not to be dragged on indefinitely, but to be a point of reference for punishing Rafael Kolompár if he didn't rewrite the car years later, while he was already selling it to his ... his cousin, and so on .... and no one is willing to admit, say, a traffic fine. "

Description : A is the area of the rectangle with length l units and breadth b units. Rewrite the formula for area making l as the subject.

Last Answer : A is the area of the rectangle with length l units and breadth b units. Rewrite the formula for area making l as the subject.

Description : (i) The Air Force targeted Tiger Hill on 2-3 July and hit the bull’s eye several times. (Use ‘Not only But also’ and rewrite)

Last Answer : (i) The Air Force targeted Tiger Hill on 2-3 July and hit the bull's eye several times. ... not be able to dislodge 18 Grenadiers. (Remove Negative)

Description : A simultaneous multidirectional assault emerged as the best strategy. (Use the word ‘Good’ and rewrite)

Last Answer : A simultaneous multidirectional assault emerged as the best strategy. (Use the word ‘Good’ and rewrite)

Description : Rewrite the given statements in their order of occurance: (i) 18 Grenadiers probed to scout for suitable routes for the assault.

Last Answer : Rewrite the given statements in their order of occurance: (i) 18 Grenadiers probed to ... Projected Mission Tiger Hill as a national challenge.

Description : Rewrite the given statements in their order of occurrence. The most difficult task of maintaining the hold on Tiger

Last Answer : Rewrite the given statements in their order of occurrence. The most difficult task of maintaining ... casualties, 8 Sikh captured Helmet on 5 July.

Description : State true or false. If false correct the statement and rewrite. Different quantities are measured in different units.

Last Answer : State true or false. If false correct the statement and rewrite. Different quantities are measured in different units.

Description : How do you rewrite 0.04 as a fraction?

Last Answer : 4/100

Description : Why do you need to rewrite a mixed fraction as an improper fraction in order to multiply?

Last Answer : You do not but you are more likely to make mistakes if youdon't.

Description : How do I rewrite 6.03 as a decimal fraction?

Last Answer : Your rewrite it as 66

Description : In your own words rewrite juliets speech in scene 2?

Last Answer : Need answer

Description : In your own words rewrite juliets speech in scene 2 lines 33-36?

Last Answer : Need answer

Description : How do I rewrite 6.03 as a decimal fraction?

Last Answer : Your rewrite it as 66

Description : Why do you need to rewrite a mixed fraction as an improper fraction in order to multiply?

Last Answer : You do not but you are more likely to make mistakes if youdon't.

Description : If you rewrite the following word equation as a balanced chemical equation what will the coefficient and symbol for fluorine be nitrogen trifluoride nitrogen plus fluorine?

Last Answer : 2NF3 --> N2 + 3F2