Question
Can you please explain the difference between boolean & operator and the && operator in java programming?

Answers

If an expression involving the Boolean & operator is evaluated, both operands are evaluated. Then the & operator is applied to the operand. When an expression involving the && operator is evaluated, the first operand is evaluated. If the first operand returns a value of true then the second operand is evaluated. The && operator is then applied to the first and second operands. If the first operand evaluates to false, the evaluation of the second operand is skipped.
Operator & has no chance to skip both sides evaluation and && operator does.    Your Comment




More Software,Java,operator Questions..
What is the inputsplit in map reduce software?

Can variables be used in Java without initialization?

What is the difference between java bean and enterprise java bean?

What is software configuration management?

How does the java database connectivity (jdbc) work?

What are the advantages of threads in java?

What is the purpose of . Operator?

Define scope resolution operator?

What Is Java Api For Xml-based Rpc (jax-rpc)?

How can you implement fine-grained auditing?

What is IBM’s simple explanation for Big Data’s four critical features?

What is static synchronized method in JDBC API? Give an example?

What does the NULLIF function do?

What happens if a start method is not invoked and the run method is directly invoked?

Should we override finalize method

what is the difference between mysql_fetch_array and mysql_fetch_object?

How will XML affect my document links?

What is object cloning in Java?

Why to use Style Sheets?

What are Filters in MVC?



Search
Can you Answer!!
  • Q India & Pakistan signed the Tashkent Declaration on:
  • Q The Government of India has approved Rs 20,000 Crore for which programme, aiming to integrate the effort to clean and protect the river Ganga in a comprehensive manner?
  • Q Who starred as the Six Million Dollar Man
  • Q Why Air services Australia? What do you know about Airservices Australia? Company profile of Air services Australia?
  • Q What is the number of seats allotted to Scheduled Tribes in Lok Sabha?
  • Q What are the different types of error?
  • Q What is the most frequent cause of business errors
  • Q If i delete a template from the list in sql studio, will it be deleted from the hard disk?
  • Q What are the uses of append query
  • Q Explain why httpservlet is declared abstract.
  • Q How can you get SQL Server 2005 to simulate multiple processors for query testing?