Computer Science, asked by jothika1, 1 year ago

what is syntax errors

Answers

Answered by kritikaThakur
9
In computer science, a syntax error is an error in the syntax of sequence of characters of tokens that is intended to be written in a particular programming language . For compiled languages , syntax errors are deleted at compile time. a programme will not compile until all syntax errors are corrected

kritikaThakur: mujhe unblock krna ni ata
kritikaThakur: tum bna lo
kritikaThakur: pata ni
kritikaThakur: tujhe msg krna h to kr ni krnaa to mat kr
Answered by SƬᏗᏒᏇᏗƦƦᎥᎧƦ
55

✨✨ Syntax errors✨✨

Syntax errors occur due to the the fact that the syntax of the programming language has not been followed correctly. Syntax errors are analogous to spelling or grammatical mistakes in a language such as English.

Syntax is the arrangement of tokens to create well-formed statements in a programming language.

Extra info.

Common Syntax errors in Java include the following:

Missing semicolon after a statement.

Syntax error Correct version;

cØunt++ count++;

⭐ Missing or unmatched brackets.

Syntax error

public void TestMethod

{

System out.print("hello there!")

Correct version

public void TestMethod

{

System.out.print("Hello there!");

}

⭐ Incorrect spelling of keywords or identifiers

Syntax error

public statc void Hello( )

{

int count;

count++:

Correct version

public static void Hello ( )

{

int count;

count++;

}

⭐ Using assignment operator (=) instead of an equality operator(==)

Syntax error

c = ( a=b ) ? a : b

Correct version

c = ( a == b) ? a : b

Similar questions