Computer Science, asked by sanchana33, 11 months ago

write a java statement to initialise the value of Pi such that it occupies less space​

Answers

Answered by muneejaslam786
0

Answer:

Mark me as brainliest

Statements are like complete imperative sentences in Java: each commands Java to perform some action. Just as we said that Java evaluates expressions, we say that Java executes statements. We already have studied the Java declaration statement, which declares variables (and optionally initializes them). We will classify many statements as control structures: such statements control (conditionally/by repetition) the execution of other statements.

In this lecture we will first learn how to write the simplest kind of statement in Java, the expression statement, and the simplest control structure in Java, the block statement, We will also begin discussing two analysis tools: hand simulation via trace tables, and statement boxing (which is the statement equivalent of oval diagrams for expressions).

Then we will learn about Java's most important control structures, starting with if statements for decisions and simple for/break statements for looping. We will extend our analysis tools, trace tables and boxing, to cover these statements. Eventually we will generalize the for loop and cover two variants of looping: while and do statements.

Finally, we will begin learning about Java's try-catch statement: a control structure that programmers use to process exceptions. Sometimes when an operator or method fails by throwing an exception, it does not denote a failure of the program, but is just a signal to the program that it must take some special action. We will continue exploring the use of the try-catch statement in our next lecture, in the context of file I/O.

Explanation:

Similar questions