Write Java code to assign the value 10 to variable x and store its square value in another variable y. -Technology

1 Answer

Answer :

class Square{public static void main (String args [ ]){int x. y ; x = 10 : y = x * x ;

Related questions

Description : Write the value that will be stored in variable a after execution of the following code if : -Technology

Last Answer : (i) Value of a = 10, if initial value of a is 8(ii) Value of a = 17, if initial value of a is 10

Description : Ruby, a class XI student has just started learning java programming. Help her in the following: (i) Explain her the concept of variable -Technology

Last Answer : (i)Variables are named storage location to store values temporarily which can be changed during program execution.Data type states the way the values of that type are stored, the operations that can be done ... setText( Just Pass );In the above if statement, value of marks is being compared with 40.

Description : What will be the final value of variable x after the following code is executed: -Technology

Last Answer : The value is:1

Description : When one object reference variable is assigned to another object reference variable then (A) a copy of the object is created. (B) a copy of the reference is created. (C) a copy of the ... not created. (D) it is illegal to assign one object reference variable to another object reference variable.

Last Answer : (B) a copy of the reference is created.

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 : Lauren, a systems analyst, has excellent interpersonal skills. To take advantage of her  skills, the functional lead of the project should assign her to program in Java and C++

Last Answer : Ans: False

Description : Anju, a beginner in java programming has written following code with some mistakes: -Technology

Last Answer : int k=0;String s='Save Earth';int l=s.length();for(int i=0;k

Description : Explain the purpose of pow() method with the help of suitable java code. Also mention that pow() method belongs to which class? -Technology

Last Answer : pow() method, a mathematical method, helps in calculating the power of any number.For example:int num=2,power=4;int ans=Math.pow(num,power);t1.setText(''+ans);The above code will calculate the value of 24 and will give answer 16.pow() method belongs to math class.

Description : Find the output of the following Java code snippet after execution of each java statement labelled -Technology

Last Answer : The output is:IN5inin5

Description : Find output of the following Java code snippet : -Technology

Last Answer : OutputDelhi 110001 10001

Description : Realising that his new video game will be on the edge of contributing some profit in its second year, Gary lobbies hard to have the accounting department assign other projects in the firm ... . These costs are called __________ costs. A)fixed B)variable C)traceable common D)nontraceable common

Last Answer : D)nontraceable common

Description : The term ___________ is used for a depth-first search that chooses values for one variable at a time and returns when a variable has no legal values left to assign. a) Forward search b) Backtrack search c) Hill algorithm d) Reverse-Down-Hill search

Last Answer : b) Backtrack search

Description : Write java statement to make the Net Fee text field named txtNetFee un_editable at run time. -Technology

Last Answer : txtNetFee.setEditable(false);

Description : Assume that variable x resides at memory location 1234, y at 1111 and p at 2222. Int x=1, y=2, *p; p=&x; y=*p; What will be the value of y after execution of above code? A) 2 B) 1 C) 1234 D) 1111

Last Answer : C) 1234

Description : During the testing of a module tester X' finds a bug and assigned it to developer. But developer rejects the same, saying that it's not a bug. What X' should do? A. Report ... same bug to another developer D. Send to the detailed information of the bug encountered and check the reproducibility

Last Answer : D. Send to the detailed information of the bug encountered and check the reproducibility

Description : During the testing of a module tester X' finds a bug and assigned it to developer. But developer rejects the same, saying that it's not a bug. What X' should do? A. Report ... same bug to another developer D. Send to the detailed information of the bug encountered and check the reproducibility

Last Answer : D. Send to the detailed information of the bug encountered and check the reproducibility

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 : Match the items of Column I with item of Column II and assign the correct code.

Last Answer : Match the items of Column I with item of Column II and assign the correct code. A. `{:(,A,B,C,D),(,2,3,4,1):}` ... }` D. `{:(,A,B,C,D),(,4,5,3,2):}`

Description : Match the items of Column I with item of Column II and assign the correct code.

Last Answer : Match the items of Column I with item of Column II and assign the correct code. A. `{:(,A,B,C,D),(,3,4,2,1):}` ... }` D. `{:(,A,B,C,D),(,1,2,3,4):}`

Description : Match the items of Column I with item of Column II and assign the correct code.

Last Answer : Match the items of Column I with item of Column II and assign the correct code. A. `{:(,A,B,C,D),(,4,2,3,1):}` ... }` D. `{:(,A,B,C,D),(,3,4,5,1):}`

Description : Match the items of column I with items of column II and assign the correct code. `{:(ColumnI,ColumnII),((A)"Pendulum",(1)"Chrome steel"),((B)"Malachit

Last Answer : Match the items of column I with items of column II and assign the correct code. `{:(ColumnI,ColumnII),((A)"Pendulum",( ... {:(,A,B,C,D),(,4,5,3,2):}`

Description : To display (X+Y)2, correct HTML code is (a) (X+Y)2 -Technology

Last Answer : (c) (X+Y) 2 code is correct because superscript have to be placed in between and tags.

Description : Ruby, a class XI student has just started learning java programming. Help her in the following: -Technology

Last Answer : i. Variables are named storage location to store values temporarily which can be changed during program execution.Data type states the way the values of that type are stored, the operations that can be done ... setText( Just Pass );In the above if statement, value of marks is being compared with 40.

Description : (a) Following is a list of programming languages : BASIC, COBOL, C, JAVA -Technology

Last Answer : (a) JAVA, COBOL(b) jListl. getSelectedValue ( ) ;

Description : How do I copy all the code from another site with Java phone and bring it to my memory ?

Last Answer : You can copy the code and save it in memory in the form of file.txt .

Description : Write an HTML code to create the following table: 100 Amit 10 A -Technology

Last Answer : The HTML code is Roll NumberNameClass 100 Amit 10 A 101 Ankit 10 B 102 Arnab 10C Footer 1 Footer 2 Footer 3

Description : What Is Anchor Text?  A. It Is The Main Body Of Text On A Particular Web Page  B.It Is The Visible Text That Is Hyper Linked To Another Page  C.It Is The Text Within The Left Or Top ...  D.It Is The Most Prominent Text On The Page That The Search Engines Use To Assign A Title To The Page

Last Answer : B.It Is The Visible Text That Is Hyper Linked To Another Page

Description : What is anchor text?  A. It is the visible text that is hyperlinked to another page  B.It is the main body of text on a particular web page  C.The text within the left or top panel of a ... D.It is the most prominent text on the page that the search engines use to assign a title to the page

Last Answer : A. It is the visible text that is hyperlinked to another page

Description : Why do people assign such value to life, when it's really just a matter of chance and biology?

Last Answer : Because you only get one life. No do-overs.

Description : What is the environment variable that contains a list of directions where Java looks for classes referenced in a program: a) CLASSPATH b) PATHDIR c) SEARCHPATH d) PATHCLASS e) None of The Above

Last Answer : a) CLASSPATH

Description : In Java variables, if first increment of the variable takes place and then the assignment occurs. This operation is also called ............................. . A) pre increment B) post increment C) incrementation D) pre incrementation

Last Answer : A) pre increment

Description : Write a program to declare class having data member as hrs, mins, secs. Write constructor to assign values and destructor to destroy values. Accept & display data for one object.

Last Answer : #include<iostream.h> #include<conio.h> class time { private: int hrs, mins,sec; public: time(int h,int m,int s) { hrs=h; mins=m; sec=s; } ~time() { cout<< hours ... } }; void main() { time t(2,43,56); t.display(); getch(); }

Description : The per share value Dev should assign to RC Ltd. is closest to ___________. a) Rs.15.35 b) Rs.20.86 c) Rs.17.35 d) Rs.18.46

Last Answer : c) Rs.17.35

Description : Write the data type of variables that should be used to store : 1. Marks of students 2. Grades of students (Grade can be ‘A or ‘B’ or ‘C’) -Technology

Last Answer : (i) int data type(ii) char data type

Description : The question to be answered by factorial analysis of the quantitative data does not explain one of the following (A) Is X' related to Y' ? (B) How is X' related to Y'? (C) How does X' affect the ... levels of another independent variable K' or M' ? (D) How is X' by K' related to M'?

Last Answer : (D) How is ‘X’ by ‘K’ related to ‘M’?

Description : Write HTML code to set the image ‘Pen. jpg’ stored in ‘My Pictures’ folder in C: -Technology

Last Answer : The HTML code is .

Description : Write the extension of HTML code file. -Technology

Last Answer : The extension of HTML code file is.html or .htm

Description : Identify the error(s) in the following HTML code. Also, write the correct code. -Technology

Last Answer : The error in the code is that in place of color attribute there should be bgcolor.The correct code is

Description : What is the use of tag in HTML code? Write any two options used with this tag. -Technology

Last Answer : The tag is used to change the size, color and type face of the text on HTML page. It uses attributes such as size, face etc.

Description : Identify the errors and write the correct HTML code 1. -Technology

Last Answer : 1. 2.

Description : Write the HTML code to display horizontal line of red color. -Technology

Last Answer :

Description : What is the use of tag in HTML code? Write any two attributes used with this tag. -Technology

Last Answer : The tag encloses the main part of the document. It contains all the contents of a document. Various markup elements are allowed within the body to indicate headings, paragraphs, lists, hypertext links, images and so on. The tag uses various attributes such as background, bgcolor etc.

Description : Write the HTML code to set the bgcolor as pink, heading level 2, text -Technology

Last Answer :

Description : Write the HTML code to create a paragraph whose text color is blue. -Technology

Last Answer : or

Description : Identify error(s) in the following HTML code. Also, write the correct code. type=“a” start=“d”> -Technology

Last Answer : tag’s attributes should be placed in between . In the list, the start attribute must be set to a numeric value and type attribute specifies ‘A’, ‘a’, T ‘i’ or ‘1’. So, the correct code is

Description : Write a code to produce the following output. -Technology

Last Answer : ComputerAn electronic machineCPU Brain of computer

Description : Write HTML code to display various bullet types. -Technology

Last Answer : LotusRoseSunHoonoutput

Description : Write HTML code to display ordered lists. -Technology

Last Answer : Many Ordered ListNumbered listSunMoonLetters 1is t SunMoonLowercase letters starting from 3rd 1etter

Description : Which program do you need to write HTML code? (a) Spreadsheet (b) Access -Technology

Last Answer : (c) From the given options, Notepad is useful program to write HTML code.

Description : Write the HTML code to display an image on the right side of the page. -Technology

Last Answer :