Types of brackets used in Programming Languages - Codes


There are 4 kinds of brackets that are used in most programming languages such as Java, PHP, HTML, CSS, Python, Scala, C#, .Net, etc,

1. Square brackets [ ]

Square brackets [ and ] are also called "brackets" in programming,

Some other names,

  • "crotchets"
  • "closed brackets"
  • "hard brackets"
  • These are mostly used to define arrays.

2. Curly brackets { }

Curly brackets { and } are also known as "curly braces" or simply "braces"

  • "definite brackets"
  • "swirly brackets"
  • "birdie brackets"
  • "French brackets"
  • "flower brackets"
  • "Scottish brackets"
  • "squirrelly brackets"
  • "gullwings", "seagulls"
  • "squiggly brackets"
  • "twirly brackets"
  • "Tuborg brackets"
  • "accolades"
  • "pointy brackets"
  • "fancy brackets"
  • "M Braces"
  • "moustache brackets"
  • "squiggly parentheses"

3. Rounded brackets ( )

Rounded brackets are the most commonly used brackets in all programming and scripting languages,

Aslo know as,

  • "Parentheses"
  • "brackets"
  • "parens"
  • "round brackets"
  • "circle brackets"
  • "smooth brackets"

4. Angle brackets < >

These brackets are mostly used to define HTML/XML tags, as well as generics in Java,

Aslo know as,

Advertisements
Try Out Code2care Dev Tools:

Advertisements

Advertisements
Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities.

Students and software developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include learnings, tutorials, trouble-shooting steps, video tutorials, code snippets, how-to, blogs, articles, etc.

🎉 We are celebrating the 10th years of Code2care! Thank you for all your support!

We strongly support Gender Equality & Diversity.