- Q The reason behind the declining climate of Maldives is –
- Q Which queen enjoyed political power along ‘with her husband?
- Q Which national leader is associated with the slogan of 'Total Revolution'?
- Q What do you understand by Data Model?
- Q Tell me about AIX Administrator?
- Q What are the types of functional testing?
- Q When demobilization orders are not required, what two documents are used to verify deactivation (A)DD Form 214 and the paid travel voucher (B)Copy of activation orders and DD Form 214 (C)DD Form 214 and a copy of temporary duty (TDY) orders (D)Copy of temporary duty (TDY) orders and paid travel voucher
- Q What is a tableau data pane?
- Q Which of the following is considered as the Fourth Estate?
- Q Requirements Based testing Explain Requirements Based testing.
- Q How to specify the duration? - SMIL
Question
Which of the following lines will compile without warning or error.
1) float f=1.3;
2) char c="a";
3) byte b=257;
4) boolean b=null;
5) int i=10;
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
Answers
5) int i=10;
explanation:
1) float f=1.3;
Will not compile because the default type of a number with a floating point component is a double. This would compile with a cast as in float f=(float) 1.3
2) char c="a";
Will not compile because a char (16 bit unsigned integer) must be defined with single quotes. This would compile if it were in the form char c='a';
3) byte b=257;
Will not compile because a byte is eight bits. Take of one bit for the sign component you can define numbers between -127 to +127
4) a boolean value can either be true of false, null is not allowed. Your Comment
explanation:
1) float f=1.3;
Will not compile because the default type of a number with a floating point component is a double. This would compile with a cast as in float f=(float) 1.3
2) char c="a";
Will not compile because a char (16 bit unsigned integer) must be defined with single quotes. This would compile if it were in the form char c='a';
3) byte b=257;
Will not compile because a byte is eight bits. Take of one bit for the sign component you can define numbers between -127 to +127
4) a boolean value can either be true of false, null is not allowed. Your Comment
- 0
- 0
- New Answer
- Contributors: *,
More Software,Java Questions..
What is the inputsplit in map reduce software?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
Can variables be used in Java without initialization?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Java,
What is the difference between java bean and enterprise java bean?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Java,
What is software configuration management?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
How does the java database connectivity (jdbc) work?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Java,
What are the advantages of threads in java?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 0 )
- Tags: Java,
What Is Java Api For Xml-based Rpc (jax-rpc)?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
How can you implement fine-grained auditing?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
What is IBM’s simple explanation for Big Data’s four critical features?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
What is static synchronized method in JDBC API? Give an example?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
What does the NULLIF function do?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
What happens if a start method is not invoked and the run method is directly invoked?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
Should we override finalize method
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
what is the difference between mysql_fetch_array and mysql_fetch_object?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
How will XML affect my document links?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
What is object cloning in Java?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 0 )
- Tags: Java,
Why to use Style Sheets?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
What are Filters in MVC?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
Can you explain Application layer in OSI model?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
How to define new testplan attributes?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,