myCompiler
English
Deutsch
English
Español
Français
Italiano
日本語
한국어
Nederlands
Polski
Português
Recent
Login
Sign up
Deutsch
English
Español
Français
Italiano
日本語
한국어
Nederlands
Polski
Português
Recent
Login
Sign up
S
@sanjivani_123
file read_write
Java
2 years ago
-------------------File reader------------------------------------------------------- package samplecode; // Reading data from a file using FileReader import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileReader
interface implimentation
Java
2 years ago
package samplecode; interface Shape { double pi=3.14; public void getArea(int a); } class Circle implements Shape
abstract class
Java
2 years ago
package samplecode; public class Exp09 { public static void main(String[] args) { abc obj=new abc(); obj.Car1(); obj.Car2(); }
inheritance
Java
2 years ago
package samplecode; public class Exp08 { public static void main(String[] args) { parent obj1=new child(); child obj2=new child(); gchild obj3=new gchild(); obj1.display();
exception handiling
Java
2 years ago
import java.util.Scanner; public class Exp07 { public static void main(String[] args) { int x=10; Scanner sc=new Scanner(System.in); int n=sc.nextInt(); int a[]= {10,20,30,40,50};
constructor
Java
2 years ago
public class Exp06 { Exp06(int a){ this(20,15); System.out.println("1 parameter constructor..."+a); } Exp06(int a, int b){ this("SANJIVANI");
Pass obj/string func
Java
2 years ago
public class Exp05 { int a,b; Exp05(int i, int j){ a=i; b=j; } public boolean compareTo(Exp05 o) {
Previous
Next page