Online Training Spring Hibernate Training in Delhi R Programming Training Course Big Data and Hadoop Training Java Training  
 

java

Ads

 
 

Share on Google+Share on Google+

Rajendra Malviya
java
2 Answer(s)      5 years and 11 months ago
Posted in : Java Interview Questions

why iterator in java if we for loop?

Ads
View Answers

August 3, 2011 at 12:02 PM


The collection always has a getter armed with the iterator's next value. Much of the collection's internal implementation is done via the iterator.Iterators are saferand used only with collections as they have a little more flexibility since you can go backwards and forwards with them. It will allow you to remove an element.



October 3, 2012 at 2:10 PM


1)An interface contain only abstract methods and constants. But abstract class contain zero or more abstract methods and also class level variables like instance,static and constant variables.

2) interface does not contain any constructors. But abstract class must contain the constructor.

3) It is not possible to create object to both interface and abstract class. But it is possiblt to invoke the abstract class constructor by using it's subclass constructor.

4) to forcing the all developers to use perticular methods prototypes we use interface. There are two senarios are their to declare the class as abstract. The first one is , can not allow any one to creat the object to class directly. The another one is a class contain the abstract methods.


Ads









Related Tutorials/Questions & Answers:
java
java  diff bt core java and java
java
java  what is java
Advertisements
JAVA
JAVA  how the name came for java language as "JAVA
java
java   why iterator in java if we for loop
java
java  explain technologies are used in java now days and structure java
java
java  different between java & core java
Java
Java   Whether Java is pure object oriented Language
java
java  is java open source
java
java  what is java reflection
java
java   in java does not pointers concept but what is nullpointers in java?   nullpointer is a runtime Exception
java
what is the size of array in java ?  what is the size of array in java ? what is the mean of finalize in java
java
java  Does java allows multiline comments
java
java  give a simple example for inheritance in java
java
java  why to set classpath in java
java
java  what are JAVA applications development tools
Java
Java   Whether Java is Programming Language or it is SOftware
java
java  explain object oriented concept in java
java
java   difference between class and interface
Java
Java  how to draw class diagrams in java
java
java   What is ?static? keyword
java
java  RARP implementation using java socket
java
java  sample code for RARP using java
Java
Java  how to do java in command prompt
java
java  give a simple example for inheritance in java
java
java  why to set classpath in java
java
java  why to set classpath in java
java
java  why to set classpath in java
java
java  Write a java code to print "ABABBABCABABBA
java
java  write a program in java to acess the email
java
java  send me java interview questions
java
java  how use java method