- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
interface Data { public void load(); } abstract class Info { public abstract void load(); } public class Employee extends Info implements Data { public void load (){ System.out.println ("loading"); /*do something*/ } } Why this code is correct ? Is it is not compulsory to deine the method declared … |
|
1) What are three ways of creating a String object ? 2) What is the difference between string concat method and simply adding 2 strings ? |
|
` Hey can u solve my prob. I was running an Applet program(.html file) with java Browser but it showing error = "your security settings have blocked a local application from running" So can u say ... which application is this |
|
import java.util.Scanner; package p1; class Electricity { int cread=18634,fix_rate,due,ub_tax,curr_charge,bill,to_bill ; int pread,unit ; System.out.println("fix_rate="); Scanner sc=new Scanner(System.in); int fix_rate=sc.nextInt(); System.out.println("due="); int due= sc.nextInt(); System.out.println("ub_tax="); int ub_tax= sc.nextInt(); System.out.println("curr_charge="); int curr_charge= sc.nextInt(); System.out.println("unit="); int unit=sc.nextInt(); public void calc() { do { pread=cread-unit; System.out.println("fix_rate=" +pread); } while(unit<200) { int c1=2.75*unit; System.out.println(c1); } … |
|
interface Interface1 { public int method1(); public int method2(); } public class Salary implements Interface1 { public static void main(String args[]) { int sa[]=Integer.parseInt(arg[0]); float pf,hra,da,tax,net; public int method1() { System.out.println("salary="+sa); try{ if(sa>250000) { pf=sa*5/100; hra=sa*10/100; da=sa*8/100; tax=sa*10/100; net=sa+tax; System.out.println("Net salary of an employee"+net); } } catch(Exception e) { System.out.println("I/O … |