Java

Topic: Java basics

Explain Java Increment and Decrement Operators?

x = 1;y = ++x;System.out.println(y);prints 2, butx = 1;y = x++;System.out.println(y);

Browse random answers:

 Are JVM's platform independent?
What are wrapper classes?
What will be the problem if you don't override hashcode() method ?
What is the difference between a JDK and a JVM?
What are Vector, Hashtable, LinkedList and Enumeration?
Is it better to synchronize critical section of getInstance() method or whole getInstance() method ?
What is a pointer and does Java support pointers?
What is the difference between set and list?
 What is the difference when String is gets created using literal or new() operator ?
What is the difference between procedural and object-oriented programs?
What is a stream and what are the types of Streams and classes of the Streams?
Does not overriding hashcode() method has any performance implication ?
What are Encapsulation, Inheritance and Polymorphism?
What is an I/O filter?
What’s wrong using HashMap in multithreaded environment? When get() method go to infinite loop ?
What is the difference between Assignment and Initialization?
What is serialization and deserialization?
Give a simplest way to find out the time a method takes for execution without using any profiling tool?
What is OOPs?
What is JDBC?
What do you mean by platform independence? 
What are Class, Constructor and Primitive data types?
What are drivers available?
Are JVM's platform independent?
What is an Object and how do you allocate memory to it?
What is the difference between JDBC and ODBC?-
What is a JVM?
What are methods and how are they defined?
What are the types of JDBC Driver Models and explain them?
What is the difference between a JDK and a JVM?
What is the use of bin and lib in JDK?
What are the steps involved for making a connection with a database or how do you connect to a database?
What is a pointer and does Java support pointers? 
What is casting?
What type of driver did you use in project?- 
What is the base class of all classes?
How many ways can an argument be passed to a subroutine and explain them?
What are the types of statements in JDBC?
Does Java support multiple inheritance?
What is the difference between an argument and a parameter?-
How to create and call stored procedures?
is Java a pure object oriented language? 
What is UNICODE?
What is the difference between an applet and a servlet?
Are arrays primitive data types? 
What is Garbage Collection and how to call it explicitly?
Is it possible to communicate from an applet to servlet and how many ways and how?
What is difference between Path and Classpath? 
What are Transient and Volatile Modifiers?
What are local variables? 
What is meant by Inheritance and what are its advantages?
What are instance variables? 
What is the difference between this() and super()?
How to define a constant variable in Java? 
What is the difference between superclass and subclass?
Should a main method be compulsorily declared in all java classes?
What are inner class and anonymous class?
What is the return type of the main method?
What is the difference between Integer and int?
Why is the main method declared static?
Explain about Java Hello World Program?
What is the arguement of main method?
Explain Java Comments?
Can a main method be overloaded? 
Explain Java Data and Variables?
Can a main method be declared final? 
Explain Java Command Line Arguments?
Does the order of public and static declaration matter in main method?
Explain Java Arithmetic Operators?
Can a source file contain more than one Class declaration?
Explain Java Assignment Operators?
What is a package?
Explain Java Increment and Decrement Operators?
Which package is imported by default?
Explain Java Relational Operators?
Can a class declared as private be accessed outside it's package?
Explain Java Boolean Operators?
Can a class be declared as protected?
Explain Java Conditional Operators?
Explain Java Variables and Arithmetic Expressions?
What is a method?
How to make executable jar files in JDK?
Can constructor be inherited?
What are the differences between Contructors and Methods?
What are the differences between Class Methods and Instance Methods?
What are Access Specifiers?
What is final modifier?
What are the uses of final method?
What is static block?
What are static variables?
What is the difference between static and non-static variables?
What are static methods?
What is internationalisation? How can you achieve in java? 
What is the default size of vector and StringBuffer? 
Which Java operator is right associative?
What is an Iterator ?
How do you traverse through a collection using its Iterator?
Which four options describe the correct default values for array elements of the types indicated?int -> 0    String -> "null"    Dog -> null    char -> '\u0000'    float -> 0.0f    boolean -> true
How do you remove elements during Iteration?
Which one of these lists contains only Java programming language keywords?