Skip to main content

Posts

Showing posts from November, 2019

How to code

How to write a program First understand the concept clearly then only start to code, unless your efforts will be of no use. When you code, you should mean it. Writing a program is not only about getting the output, you should keep in mind the following things too 1. How efficiently we are using the memory 2. How fast your program runs What an interviewer or company wants from you 3. Wether your program is clear and easy to understand or not. I. Use the variable names that relate to their usage Example : If I want to store student marks int studentmarks; int n; In the above two declarations variable studentmarks is most easy to understand than declaring variable as n II. Follow indentation while writing the code. Example for(int i=0; i<n; i++) { System.out.println("value in outer loop is "+i); for(int j= 0; j< n; j++) { System.out.println("value in inner loop is"+j); } } Which statements belongs to which blockšŸ¤” Follow in...

Topics covered so far

Topics Discussed Setting Path variable for java - why to set path ? Principles of Object Oriented Programming 1. Class 2. Object 3. Abstraction 4. Encapsulation 5. Inheritance 6. Polymorphsim Features of Java 1. Simple:     Easy to learn and understand because java follows syntax similar to popular languages like c and c++. 2. Object Oriented:      Java follows oops principles which makes software development and maintenance more simple and clear. 3. Platform independent:      Unlike C, C++ and other languages java is a write once run anywhere language. Java produces platform independent code called Byte code (.class) which can be run on any platform(OS) with the help of JRE(JVM). 4. Secured:      Java is secured because there will be no memory leaks, unlike languages c and c++ memory management is taken care by java itself, thus no other user can access data from other applications. ...