0 comments

//import javautil public class Array{ public static void main(String args[]){ int myArray[]={1,2,3,4,5}; for (int i=0;i<5;i++){ System.out.println(myArray[i]); } } } ...

AprMonday,8,

library (basic java beginer)

0 comments

public class Book {     String bookName,author;     int bookId,noOfCopies;     public String getBookName() {         return bookName;     }     public void setBookName(String bookName) {         this.bookName = bookName;     }     public String getAuthor() {    ...

MarMonday,25,

Object Basics and Simple Data Objects

0 comments

Arrays An array is the collection of similar type of elements. In java when the array variable is created its length i.e. the number of elements in the array is fixed. As an example the portion args[] in main method you use is an array, but here it is not of fixed length since it is an argument (more on this later). However, if you want to have the record say name of the students...