Which of the following declaration is wrong?
int i=45;
float j = 45.0;
double k=45.0;
Answers were Sorted based on User's Feedback
Answer / shukla.swapnil
float j = 45.0; <=== this declaration is wrong
Is This Answer Correct ? | 24 Yes | 5 No |
Answer / pranav
float j = 45.0; <- This statement is wrong
Correct way is:
float j = 45.0f;
Is This Answer Correct ? | 12 Yes | 1 No |
Answer / rohit
by default it takes double.So we need to explicitly mention it as float
Is This Answer Correct ? | 4 Yes | 2 No |
what is class/object diagram
What is the use of the list interface in the java collection? : java collections
what is difference between struts1.2 and struts2.0
Q1. A. Write note on "The class path Environment Variable". B. Which are different kinds of source code? Q2. A. How to create an interface? B. Why convert an applet to an application? Q3. A. How to use Media tracker Class. B. How to use string tokenizer class. Q4. A. Explain the overview of UDP messaging. B. Difference between SQL Exception class and SQL Warning class. Q5. A. How to create com object in Java? B. Write short notes on "The properties class" Q6. A. When object is created and destroyed? B. Explain the JDB in depth & command line. C. Write short notes on Web Sites.
Runining mutiple tomcat server in a single machine is possible Yuo wil have to duplicate configuration with different port numbers
How to call the m1() method of Base class in below snippet ? class Base { public void m1() { System.out.println("Base m1 "); } public void m2() { System.out.println("Base m1 "); } } ====================== class Derived extends Base { public void m1() { System.out.println("Derived m1"); } public void m3() { System.out.println("Derived m3"); } public static void main(String[] args) { Base ob=new Derived(); ob.m1(); //System.out.println("Hello World!"+ob.m1()); } }
when exactly should we use throws ,and wen exactly should we use the try and catch for exceptional handling
How do I find jre path in windows?
httt method
Which sorting algorithm is used by collections.sort() in java ?
What are the uses of the set interfaces in the java collections? : java collections
Which is the better framework for web applications, struts or spring, and why?