Core Java

 

  1. How to get only numbers from Alphanumeric String? (Ashok)
  2. Is this Overloading or Overriding?(Nagraj)
  3. What happens If a class implements 2 interfaces having same methods?
  4. Will the Constructor be executed in Deserialization Process? (poll)
  5. How to Compare two Strings without using equals()? 
  6. Find the Heaviest Island?  (G subbarao)
  7. Can A class implement 2 interfaces having same variable name?
  8. How long can be assigned to float without TypeCasting ?
  9. Why i=i++ doesnot increment the value of i?(poll)
  10. Can anonymous Class extend Class as well as Interface?
  11. How to Get a particular word surrounded by numbers using regular Expression?
  12. Can I overload main()?(Harikanth)
  13. What Extra Modifiers are allowed in main()?
  14. Difference Between String and StringBuffer?(Harikanth)
  15. Difference between == and equals()?(Nagi Reddy)
  16. How to access private members outside of a class?
  17. How to Sort ArrayList Manually?(Jageedesh)
  18. Is Interface really meant for multiple inheritance? (poll)
  19. Is Java Pure Object Oriented Programming Language?(poll)
  20. Creating ArrayList Object using double braces technique?
  21. Jumbled Search?(Shekhar)
  22. Comparator & Comparable
  23. Access Specifier & Overriding(poll)
  24. Why Should I override hashCode() when overriding equals()?
  25. Working with CSV file
  26. ArrayList Vs Vector
  27. Serializable Vs Externalizable
  28. Convert a String to java.util.Date and java.sql.Date
  29. Create a File Using Java
  30. Create Folders and subFolders using Java
  31. List all Files and Folders present inside any Folder
  32. Java Program to Send SMS program to Your Mobile
  33. Create Formatted XML Using Java
  34. Email Validation Using regular Expression
  35. Running Java Application without main,Not  possible in Java7 latest Version
  36. Use JDK 1.6 to compile the java class as JDK 1.3
  37. Difference between ClassNotFoundException and NoClassDefFoundError
  38. Converting an Image into Base64 String
  39. Creating an Executable Jar file
  40. Void and void
  41. Why dividing floating point by zero give Infinity.
  42. You cannot Create Con.java
  43. Bubble Sort
  44. Java Version History & Features

  45. Making a Java Robot

  46. Bubble Sorting Implementation in Java

  47. Features of Java 7

  48. ArrayIndexOutOfBoundsException in Calendar class http://www.nataraz.in/calendar-class-arrayindexoutofboundsexception/

10 thoughts on “Core Java

  1. Sir, Can you tell me the logic for the given program
    Method should accept two parameters.
    First parameter is first number to display, second parameter should be number of rows to be printed

    printseries(firstparam,secondparam)

    Sample:
    printseries(7,4)

    Output should be like this
    7
    14 15
    28 29 30 31
    56 57 58 59 60 61 62 63

    • public class SeriesLogic
      {
      public static int temp=1;
      public void printseries(int firstparam,int secondparam)
      {
      for(int i=0;i<secondparam;i++)
      {
      for(int j=0;j<temp;j++)
      {
      System.out.print((temp*firstparam+j)+" ");
      }
      System.out.println();
      temp=temp*2;
      }
      }
      public static void main(String[] args)
      {
      SeriesLogic logic=new SeriesLogic();
      logic.printseries(7,4);
      }
      }

Leave a Reply