Logical operators, JAVA Programming

Assignment Help:

Logical Operators

Operator

Functionality

Example/ Explanation

 

 

&&

Looks at 2 expressions & returns a value of "true" if the expressions on the left & right of the operator are both true

If day = 'friday' && date=13 then alert("do You believe in astrology?") Compares the value of the day and the date. If it is true that today is

a Friday and if it is also true that the date is the 13th, then an alert box pops up with the message "Are You believe in astrology?"

 

 

 

 

 

||

Looks at two expressions & returns a value of "true" if either one -- although not both -- of the expressions are true.

if day='friday'&&date=13  then alert("do you believe in astrology?") else if day='friday'||date=13  then alert("Aren't you glad it isn't Friday the 13th?") Compares the value of the day & the value of the date. If it is true that today is a Friday & if it is also true that the date

is the 13th, then an alert box pops up with

the message " do You believe in astrology?" If both are not true, the script moves onto the next line of code...  Which compares the value of the day & the value of the date? If either one -- however not both -- is true, then an alert box pops up with the message "Aren't you glad it isn't Friday the 13th?"


Related Discussions:- Logical operators

Want a anti iframe breaker, Want a ANTI Iframe Breaker Project Descripti...

Want a ANTI Iframe Breaker Project Description: I want an ANTI Iframe Breaker code made, so that if I'm iframing a site, that contains JavaScript, flash or otherwise, to forc

Map objects to a relational database? , Due to impedance mismatch between r...

Due to impedance mismatch between relational technology and object you need to understand the progress of mapping classes (objects) and their relationships to tables and relationsh

Student Grades Program, The program: 2 classes one called Student, one ca...

The program: 2 classes one called Student, one called Grades Functional Requirements: Ask for how many students u need to enter the program must: prompt the user to enter the

Java , what is thread synchronization

what is thread synchronization

What are the various struts tag libraries, The Struts tag libraries are: ...

The Struts tag libraries are: ? HTML Tags ? Logic Tags ? Template Tags ? Bean Tags ? Tiles Tags ? Nested Tags

Explain the user defined exceptions, Explain the user defined Exceptions. ...

Explain the user defined Exceptions. User Defined Exceptions are the exceptions which are defined by user for specific purposed. This enables custom exceptions to be generated

Explain animate gifs, Explain Animate gifs? We can save 16 gif images ...

Explain Animate gifs? We can save 16 gif images of the previous instance in a single file in the form of an animated gif, and then used it in a regular tag to display a movi

Assignment , hi i wanted to know if your tutors provide solutions for progr...

hi i wanted to know if your tutors provide solutions for programming assignments

Package in java? , It helps to resolve naming conflicts when different pack...

It helps to resolve naming conflicts when different packages have classes with the same names. This also helps you prepare files within your project. As define : java.io package

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd