Search:

Type: Posts; User: mayankpant

Search: Search took 0.18 seconds.

  1. Re: Which option suits best along with reason JAVA CODE MCQ

    C:\Users\Mayank\Documents\revision\Demos.java:7: package utils does not exist
    import static utils.Repitition.twice;
    ^
    C:\Users\Mayank\Documents\revision\Demos.java:7: static...
  2. Which option suits best along with reason JAVA CODE MCQ

    1. package utils;
    2.
    3. public class Repetition {
    4. public static String twice(String s) { return s + s; }
    5. }
    and given another class Demo:

    1. // insert code here
    2.
    3. public class Demo...
  3. Re: why i m not getting run time exception , though i supposed to get exception "Not serializable exception"

    ok..i got it...if i call e.printStackTrace() , i get that exception with output

    --- Update ---

    A runtime exception because i have not serialized collar,though dog was serialized.

    ---...
  4. Re: why i m not getting run time exception , though i supposed to get exception "Not serializable exception"

    i supposed to get an run time exception because my collar obect is not serialized, where as java says that u must get an runtime exception
  5. why i m not getting run time exception , though i supposed to get exception "Not serializable exception"

    import java.io.*;

    class Dog implements Serializable
    {

    Collar col;
    int dogSize;

    Dog(Collar c,int s)
    {
Results 1 to 5 of 5