Input and output in java: –

Input and output in java: - Stream is a class which is available in package. It is sequence of bits which is used to carry the data form one place to another place. It is two types – input stream and output stream Input stream: - It is a sub class of stream it... Continue Reading →


Write a program to read the element of array using for-each loop?

public class Read {                 public static void main(String s[])                 {                                 int i[]={50,60,15,-10,3,70};                                 for(int j:i)                                 {                                                 System.out.println("The Element "+j);                                 }                 } }

Control statement: –

Control statement: - Used to control the flow of execution of program from one location to any other location inside program. Type of control statement: - Conditional control statement Decision-making / selection If-else Switch-case Iterative / looping For loop For-each loop While loop Do-while loop Unconditional statement Break Continue Return For-each loop: - This loop... Continue Reading →

Write a program to perform various task from n number of operator inside the class?

public class MixOperator {                 int i;                 public static void main(String s[])                 {                                 float f;                                 MixOperator m=new MixOperator();                                 m.i=15;                                 f=(float)m.i;                                 if(m instanceof MixOperator)                                 {                                                 System.out.println("The Type Casted Value : "+f);                                 }                                 else                                 {                                                 System.out.println("Check the Objec Again");                                 }                 } }

Create a website or blog at

Up ↑

%d bloggers like this: