It is aslo known as repetitive structure. Loop structure is used to run the block of codes until the condition is satisfied. While in execution, the if the condition is true then it is executed if the condition is false then the loop is terminated and follows the next statement of loop. Loop structure continue to execute until the condition is satisfied and it is very useful in many areas because of this feature. In java programming language, there are three options to use repetitive structure. 1) ' while ' statement 2)' do-while' statement 3)' for ' statement 1)'while' statement In while statement, certain code of block runs which is inside the while loop structure until the condition becomes false. After being the condition false, the loop will terminate itself. Syntax:- while(<condition expression>) { //program code } 2)'do-while ' statement It is also a type of statement. In this type of structure, while exp...
Long time ago I read that learning programming is so fun, if you didn't find learning programming fun then you must not interested or your teacher don't know how to teach the programming. There is also written that the programming teacher must be working on industry so that he/she could be able to teach you the way how to overcome the programming obstacles. At the beginning phase of studying programming language, I used to worry about what if i couldn't able to write the code clearly and understandable. I always used to worry about it. But one day my facilitator said that now you are developing your career in software industry. Don't ever worry about the clear code. Just you do mistake as many times as it takes to get the task done. Then after the task is done, be clear what you did, what you learned from mistakes and what problem is solved. Then always make a habit of writing comment in the source code. There are a lot of things that he told us, these are few. At...
Java programming language is very strong language. In java, all the variables and objects must have an explicit defined data type. The main role of this type is to tell the compiler that how much memory is needed to store the value of variable. In java we found that there are 2 types of data types. 1) Primitive data types. 2) Reference data types. Primitive data types are name of reserved keywords. It is special data type built into the java language. The memory space is already allocated when the variables of primitive data types are created. But in reference data types, memory space has to be allocated using the new keywords. Java supports eight primitive datatypes. They are:- Data type Description Size/Format ...
Comments
Post a Comment