Can the curly brackets { } be used to enclose a single line of code?

1 Answer

Answer :

While curly brackets are mainly used to group several lines of codes, it will still work without error if you used it for a single line. Some programmers prefer this method as a way of organizing codes to make it look clearer, especially in conditional statements.

Related questions

Description : HTML tags are enclosed in (a) curly brackets (b) square brackets -Technology

Last Answer : (d) HTML tags are enclosed within angular brackets (< and >).

Description : In HTML, tags consists of keywords enclosed within (1) angular brackets < > (2) parentheses ( ) (3) square brackets [ ] (4) flower brackets { }

Last Answer : angular brackets < >

Description : Prove that the bisector of the angles of a parallelogram enclose a rectangle. -Maths 9th

Last Answer : Solution :-

Description : In an unordered list, it is necessary to enclose each item in (a) tag (b) tag -Technology

Last Answer : (a) Each item must be enclosed in tag either in ordered list or unordered list.

Description : I would like to enclose my front porch with screen. Do I need a permit to install a screen porch in Boone, North Carolina?

Last Answer : It appears that you will need a permit to do anything significant to your porch. You can find the permit application at http://www.townofboone.net/departments/development/single/Short%20Building%20Permit%20Application. ... go to the office at 1510 Blowing Rock Road in Boone and check with them.

Description : Three corners of a rectangle, the dog park are located at (-2,1) (-2,3) and (5,3) on a coordinate plane. What is the total length of the fencing that is needed to enclose the dog park?

Last Answer : 21

Description : Bile, an emulsifier liquid, is made by the liver and later stored within the gallbladder and released in the duodenum. Bile is composed of bile salts, cholesterol and bile pigments. ... enzymes that break fats into simpler fatty acids and glycerol. Digestion System - Image Diversity: gallbladder

Last Answer : What is the adnexal organ of the digestive system in which bile is stored?

Description : When any remittance of cash/stamp are enclosed, the account bag a) The treasurer should then enclose the cash/ in the cash bag in the presence of the Sub account assistant and close and seal it also ... and closed by himself c) The cash bag will be closed in presence of Postmaster d) None of these

Last Answer : a) The treasurer should then enclose the cash/ in the cash bag in the presence of the Sub account assistant and close and seal it also in the presence of the sub account assistant.

Description : A bag is used to enclose several bags sent to the same office or section thereby affording protection to them called a) Packet Bag b) Insured Bag c) Transit Bag d) None of these

Last Answer : c) Transit Bag

Description : The most efficient way to enclose a space is within a/an A.sphere B.cube C.icosahedron D.helix

Last Answer : C.icosahedron

Description : The most efficient way to enclose a space is within a/an A.sphere B.cube C.icosahedron D.helix

Last Answer : C.icosahedron

Description : Pick up the correct statement from the following: (A) The artificial barrier constructed to enclose "n area for safe anchorage, is called break water (B) The smoothened surface at the top end of ... fending (C) The effective berthing lengths of inclined guays can be adjusted (D) All the above

Last Answer : (D) All the above

Description : ...............tag is an extension to HTML that can enclose any number of Javascript statements. (A)< SCRIPT> (B)< BODY> (C)< HEAD> (D)

Last Answer : Answer: A

Description : When is it proper to use the squared brackets on the computer's keyboard?

Last Answer : answer:I use them for arrays when programming. For example in Ruby. ary = [1, “two”, 3.0] #=> [1, “two”, 3.0]

Description : A question on the use of brackets. [Details inside].

Last Answer : answer:It is a bit awkward to have the start of your sentence be parenthetical, partly for the reason you describe. Usually a sentence should stand alone without the part in parentheses, so you capitalize the un- ... followed. What do you do? (Those ( ) are parentheses. These: [ ] are brackets.)

Description : Are there any online NCAA Men's Basketball 2010 brackets that you can fill out?

Last Answer : answer:ESPN has this covered and so does Yahoo!

Description : In which order should brackets be used?

Last Answer : answer:try this info Parentheses and (square) brackets have many functions, such as: 1. they introduce additional explanations which could be safely omitted; 2. they make reference to paragraphs, sections, etc; ... or Nances: { } angle brackets or chevrons: < > http://en.wikipedia.org/wiki/Bracket

Description : Express 100 with 5 1s. Express 100 three ways with five 5s. You can use brackets, parentheses and these signs +,-,X, / -Riddles

Last Answer : 111-11=100 (5 x 5 x 5)-(5 x 5)=100; (5+5+5+5)x 5=100;(5 x 5)(5-(5/5)=100.

Description : Fill in the blanks choosing the correct option from the brackets. -SST 10th

Last Answer : While taking a loan, borrowers look for easy terms of credit. This means low interest rate, easy condition: for repayment, less collateral and documentation requirements.

Description : Give one word for each of the following with regard to industry. The number of letters in each word are hinted in brackets. -SST 10th

Last Answer : (i) POWER is the basic requirement to run machines in any industrial set up. (ii) WORKER or the labours constitute for the man power required to handle machinery. (iii) MARKET are the areas where ... is the process to make goods. (vii) POLLUTION degrades the land, air, waters and soil resources.

Description : 7. Fill in the blanks with the right forms of the verb given in brackets. CSK- (win) the IPL championship for the fourth time.a) willb) wonc) winsd) will wins

Last Answer : 7. Fill in the blanks with the right forms of the verb given in brackets. CSK- (win) the IPL championship ... . a) will b) won c) wins d) will wins

Description : Fill in the blanks by choosing the appropriate expression given in the brackets

Last Answer : Fill in the blanks by choosing the appropriate expression given in the brackets

Description : What is the value of x in the equation 0.25 open brackets 3x - 4 close brackets - 0.5x equals 2.75 A. 27 B. 15 C. 7 D. 3?

Last Answer : Work it through, doing the same thing to both sides:0.25(3x - 4) - 0.5x = 2.75[Multiply both sides by 4]→ 4 (0.25(3x - 4) - 0.5x) = 4 (2.75)→ 4 0.25(3x - 4) - 4 0.5x = 4 2.75→ 3x - 4 - 2x = ... 11[Add 4 to both sides]→ (x - 4) + 4 = (11) + 4→ x - 4 + 4 = 11 + 4→ x = 15→ Solution is B. 15

Description : What is the the purpose of income tax brackets?

Last Answer : Income tax brackets enable the progressive taxation of income.

Description : basketball brackets standing ?

Last Answer : show standings please

Description : Do all TV wall brackets connect to every mount?

Last Answer : Yes, they all connect the same way. However, they will not be all the same size. I would make sure you use the right size before you attach the wall.

Description : What is a good TV wall brackets system?

Last Answer : I would look at places like Best Buy and ask a worker. They usual y have the best ideas because they work with it everyday.

Description : What is the sturdiest material for television wall brackets?

Last Answer : The sturdiest material for a television wall mount will be steel. This material will hold up best over time although as long as the mount is UL rated, any material will be fine.

Description : Will tv wall brackets hold the heavy TVs?

Last Answer : You have a choice when you purchase a TV wall bracket to specify the weight limits so you know whether or not a bracket will support your tv. Wall brackets are sold with a variety of size and weight limits.

Description : What are the best brands of television mounting brackets?

Last Answer : Depending upon the size of your tv, certain brands of television mounting brackets will serve your needs better than others. Another factor is the price you are willing to pay for it. Comparing various electronic manufacturers is the best way to determine the one for you. www.nextag.com

Description : Does Walmart sell brackets for tv wall mounting?

Last Answer : Yes, wallmart sells brackets for tv wall mountings. They also have good prices for the mountings. Thanks to their "rollback"...this is a link to Walmart website....http://www.walmart.com/

Description : What's the purpose of income tax brackets?

Last Answer : To enable the progressive taxation of income

Description : As shown in the illustration, what is the meaning of the numbers in brackets [ ] at location '31/33U'? EL-0100 A. Four separate devices with these part numbers feed signals into this point. ... continues on those four pages and connects to devices at the indicated coordinates. D. None of the above.

Last Answer : Answer: C

Description : Arrange the following elements as given in the brackets:

Last Answer : a) Na, Cl, Mg, P [in decreasing order of atomic size] b) Cl, Al, Na, S [ in increasing order of ionisation energy] c) Ar, He, Ne [in increasing order of number of electronic shells] a) Cl, P, Mg, Na

Description : The table gives the populations (in thousands) of ten species (A-J) in four areas (p-s) consisting of the number of habitats given within brackets against each. Study the table and answer the question which follows. ... out of p - s shows maximum species diversity? (a) s (b) p (c) q (d) r

Last Answer : (a) s

Description : To indicate a keyword as an exact match, which of the following should be used? A. Quotations B. Brackets C. Parenthesis D. Semicolon

Last Answer : B. Brackets

Description : Pick up the item whose weight is added to the weight of respective item, is (A) Cleats (B) Brackets (C) Bolts (D) All the above

Last Answer : (D) All the above

Description : Which bracket is used in Macaulays method of slope and deflection. a.Parenthesis() b.Square brackets [] c.braces {} d.None.

Last Answer : b.Square brackets []

Description : Is curly hair considered to be a trait that developed through evolution due to climate?

Last Answer : Well, of course Africans and the Irish come to mind. I’m not sure what additional benefit curly hair would give under certain circumstances. I think it’s just one of those random mutations.

Description : Where can I buy "curly oregano"?

Last Answer : I’m going to guess at your local Italian food shop

Description : How to do 50s-style curls with naturally curly hair?

Last Answer : Do you have a hairdresser you go to and could ask to style your hair for you for this occasion? I did that one year and was charged about 10 dollars.

Description : What makes hair wavy or curly?

Last Answer : answer:Because as Google says, “Hair is curly or straight, depending upon the number of disulfide bonds between hair proteins found in the hair shaft. The greater the number of links, the curlier the hair, and the fewer the number of links, the straighter the hair.”

Description : Do curly hair products work for wavy hair?

Last Answer : answer:Absolutely. As far as apply to your hair products (that is, products that don't change the chemical composition and/or shape of your hair) go, there are only a few kinds. The ones for curly hair will ... if it isn't curly, but it will help (a little) to hold a curl if you're heat-styling.

Description : Do your Compact Fluorescent bulbs (the curly ones) last 9000 hours?

Last Answer : I use them, but my house is old and the wiring, although safe (been checked by experts) is a bit funky. My curly bulbs last waaaaaaay longer than the incandescent ones, but not nearly as long as they probably ... I would log it, like you do, but I think I would be laughed at if they saw my house.

Description : Curly heads: Do you like your hair?

Last Answer : answer:My hair was straight as a child. When I hit puberty, it started to darken and get wavy and eventually - curly. I hated it for years and had no idea what to do with it. Gel? No. Blow dry? Nope. ... a little and I started to like it. Now that I'm pushing forty, I keep it short and I like it.

Description : My normally straight hair is curly since I cut it. Anyone else have this happen?

Last Answer : I have a somewhat related experience. My hair is straight as a board until 5–6”. At that point it begins to curl on the ends. The further from the 6” mark, the heavier the curl. I hate it. It used to stay completely straight. I wish it was one way or the other.

Description : Recommendations for a good deep conditioner for dry, colored, curly hair?

Last Answer : Mayo

Description : What's the best Straightener and Curler for full, thick curly hair?

Last Answer : Get it chemically straightened. You can do a perm at home, I have straightened my husband's hair when it was longer, and it won't likely be perfectly stright, but less curly and easier to straighten with ... well. Have them style the ends under if you like it that way, so it isn't needle straight.

Description : How is it possible for my hair to be curly on some days and almost completely straight on others?

Last Answer : Humidity will do that.

Description : If someone has naturally curly hair and has never used rollers then shaves it off will it stay curly forever?

Last Answer : If the hair is being made into a wig, I would imagine it would stay curly unless it is processed and straightened.