SlideShare a Scribd company logo
1 of 3
Which one is not primitive data type: Boolean, String, double, char List two relational operators
and two logical operators Are the following expressions True or False(assume x = 10) (x > 10 ||
(x-5) !=5) (x - 2) 0 Write loop in Java syntax to repeat reading input if user input x is not
between 0 and 25. What will be the value of x and sum after the following code is executed? Int
x = 0, sum = 0; while (x 2) angel +=10; else angle +=15;
Solution
1) String is a class
2)
Relational Operator : equal to operator (=) and greater than equal to (>=)
Logical Operator : && (AND) operator, || (OR operator)
3) x=10
a) (x>10 || (x-5)!=5)
here first check x>10 i.e. 10>10 which is false
then check (x-5)!=5 i.e (10-5)!=5 => 5!=5 which is false
now combine the complete equation false || false which is false
b)
(x-2) <=8 && x>0
(x-2) <=8 i.e. (10-2)<=8 which is 8<=8 which results in true
x>0 i.e. 10>0 which is true
now combine the complete true && true which is true
4)
do
{
System.out.println("Enter the value of x");
}
while(0<x<25);
5) x=0, sum=0
while loop will iterate till x<5 i.e x=0,1,2,3,4
and the expression will add the values of x (sum=sum+x)
and x++ increases the value by 1
hence
1) x=0 : sum=sum+x i.e. sum = 0+0; sum=0
2) x=1 : sum =sum +x i.e sum = 0+1; sum= 1
3) x=2 : sum =sum +x i.e sum = 1+2; sum= 3
2) x=3 : sum =sum +x i.e sum = 3+3; sum = 6
2) x=4 : sum =sum +x i.e sum = 6+4; sum = 10
At the end value of x will be 5 and sum will be 10
6) for(x=0;x<5;x++)
{
sum=sum+x;
}
7) here int len = str.length() will calculate the length of str which is 18
so System.out.println(len) will print 18.
System.out.println(str.charAt(3)); this will check character at index 3 which is l.
System.out.println(str.subString(len-4)); this function will fetch substring from str so it will
return 1201
O/P 18
l
1201
8)
here str = str+"E" , this will append E to the str whcih is starting with H
and the loop iterate for count = 0, 1
count = 0 i.e str= str+"E" i.e HE
count = 1i.e. str = str = "E" i..e HEE
now it exits the loop
now str = str+ "LP" hence str becomes HEELP
O/P : HEELP
9)
user enters the value angle = 5
now check conditions one by one
if(angle>5) i.e. 5>5 which is false
else if (angle>2) angle= angle+10 i.e. 5>2 whcih is true hence angle becomes 5+10
hence after the code execution angle becomes 15

More Related Content

Similar to Which one is not primitive data type- Boolean- String- double- char.docx

introduction to c programming and C History.pptx
introduction to c programming and C History.pptxintroduction to c programming and C History.pptx
introduction to c programming and C History.pptxManojKhadilkar1
 
Finding root of equation (numarical method)
Finding root of equation (numarical method)Finding root of equation (numarical method)
Finding root of equation (numarical method)Rajan Thakkar
 
C++ Course - Lesson 2
C++ Course - Lesson 2C++ Course - Lesson 2
C++ Course - Lesson 2Mohamed Ahmed
 
“Introduction to MATLAB & SIMULINK”
“Introduction to MATLAB  & SIMULINK”“Introduction to MATLAB  & SIMULINK”
“Introduction to MATLAB & SIMULINK”Amarjeetsingh Thakur
 
Lecture 3 and 4.pptx
Lecture 3 and 4.pptxLecture 3 and 4.pptx
Lecture 3 and 4.pptxMAHAMASADIK
 
Chapter 22. Lambda Expressions and LINQ
Chapter 22. Lambda Expressions and LINQChapter 22. Lambda Expressions and LINQ
Chapter 22. Lambda Expressions and LINQIntro C# Book
 
Why Haskell Matters
Why Haskell MattersWhy Haskell Matters
Why Haskell Mattersromanandreg
 
The Ring programming language version 1.10 book - Part 33 of 212
The Ring programming language version 1.10 book - Part 33 of 212The Ring programming language version 1.10 book - Part 33 of 212
The Ring programming language version 1.10 book - Part 33 of 212Mahmoud Samir Fayed
 
Functions In Scala
Functions In Scala Functions In Scala
Functions In Scala Knoldus Inc.
 
Towards Programming Languages for Reasoning.pptx
Towards Programming Languages for Reasoning.pptxTowards Programming Languages for Reasoning.pptx
Towards Programming Languages for Reasoning.pptxmarkmarron7
 
error 2.pdf101316, 6(46 PM01_errorPage 1 of 5http.docx
error 2.pdf101316, 6(46 PM01_errorPage 1 of 5http.docxerror 2.pdf101316, 6(46 PM01_errorPage 1 of 5http.docx
error 2.pdf101316, 6(46 PM01_errorPage 1 of 5http.docxSALU18
 
Dsp lab _eec-652__vi_sem_18012013
Dsp lab _eec-652__vi_sem_18012013Dsp lab _eec-652__vi_sem_18012013
Dsp lab _eec-652__vi_sem_18012013amanabr
 

Similar to Which one is not primitive data type- Boolean- String- double- char.docx (20)

Python
PythonPython
Python
 
Es272 ch2
Es272 ch2Es272 ch2
Es272 ch2
 
Introduction to python programming
Introduction to python programmingIntroduction to python programming
Introduction to python programming
 
Java - Operators
Java - OperatorsJava - Operators
Java - Operators
 
Java 2
Java 2Java 2
Java 2
 
introduction to c programming and C History.pptx
introduction to c programming and C History.pptxintroduction to c programming and C History.pptx
introduction to c programming and C History.pptx
 
Finding root of equation (numarical method)
Finding root of equation (numarical method)Finding root of equation (numarical method)
Finding root of equation (numarical method)
 
C++ Course - Lesson 2
C++ Course - Lesson 2C++ Course - Lesson 2
C++ Course - Lesson 2
 
“Introduction to MATLAB & SIMULINK”
“Introduction to MATLAB  & SIMULINK”“Introduction to MATLAB  & SIMULINK”
“Introduction to MATLAB & SIMULINK”
 
Lecture 3 and 4.pptx
Lecture 3 and 4.pptxLecture 3 and 4.pptx
Lecture 3 and 4.pptx
 
Operators
OperatorsOperators
Operators
 
Chapter 22. Lambda Expressions and LINQ
Chapter 22. Lambda Expressions and LINQChapter 22. Lambda Expressions and LINQ
Chapter 22. Lambda Expressions and LINQ
 
Arrays
ArraysArrays
Arrays
 
07. Arrays
07. Arrays07. Arrays
07. Arrays
 
Why Haskell Matters
Why Haskell MattersWhy Haskell Matters
Why Haskell Matters
 
The Ring programming language version 1.10 book - Part 33 of 212
The Ring programming language version 1.10 book - Part 33 of 212The Ring programming language version 1.10 book - Part 33 of 212
The Ring programming language version 1.10 book - Part 33 of 212
 
Functions In Scala
Functions In Scala Functions In Scala
Functions In Scala
 
Towards Programming Languages for Reasoning.pptx
Towards Programming Languages for Reasoning.pptxTowards Programming Languages for Reasoning.pptx
Towards Programming Languages for Reasoning.pptx
 
error 2.pdf101316, 6(46 PM01_errorPage 1 of 5http.docx
error 2.pdf101316, 6(46 PM01_errorPage 1 of 5http.docxerror 2.pdf101316, 6(46 PM01_errorPage 1 of 5http.docx
error 2.pdf101316, 6(46 PM01_errorPage 1 of 5http.docx
 
Dsp lab _eec-652__vi_sem_18012013
Dsp lab _eec-652__vi_sem_18012013Dsp lab _eec-652__vi_sem_18012013
Dsp lab _eec-652__vi_sem_18012013
 

More from SUKHI5

Ghocse the correct answer below- A- No- because the probabafy of burvi.docx
Ghocse the correct answer below- A- No- because the probabafy of burvi.docxGhocse the correct answer below- A- No- because the probabafy of burvi.docx
Ghocse the correct answer below- A- No- because the probabafy of burvi.docxSUKHI5
 
Given Data- MAGLIOCHETTI MOVING CORP- Statement of Earni.docx
Given Data-               MAGLIOCHETTI MOVING CORP- Statement of Earni.docxGiven Data-               MAGLIOCHETTI MOVING CORP- Statement of Earni.docx
Given Data- MAGLIOCHETTI MOVING CORP- Statement of Earni.docxSUKHI5
 
From this table- which mineral level had a significance on which varia.docx
From this table- which mineral level had a significance on which varia.docxFrom this table- which mineral level had a significance on which varia.docx
From this table- which mineral level had a significance on which varia.docxSUKHI5
 
Given a ListItem class- complete main() using the built-in list type t.docx
Given a ListItem class- complete main() using the built-in list type t.docxGiven a ListItem class- complete main() using the built-in list type t.docx
Given a ListItem class- complete main() using the built-in list type t.docxSUKHI5
 
Given a -discrete object- O- the notationO means what- Choose all the.docx
Given a -discrete object- O- the notationO means what- Choose all the.docxGiven a -discrete object- O- the notationO means what- Choose all the.docx
Given a -discrete object- O- the notationO means what- Choose all the.docxSUKHI5
 
Give five examples of unsustainable living or actions from your own ev.docx
Give five examples of unsustainable living or actions from your own ev.docxGive five examples of unsustainable living or actions from your own ev.docx
Give five examples of unsustainable living or actions from your own ev.docxSUKHI5
 
Give an inductive definition of the function rev which takes a list an.docx
Give an inductive definition of the function rev which takes a list an.docxGive an inductive definition of the function rev which takes a list an.docx
Give an inductive definition of the function rev which takes a list an.docxSUKHI5
 
Give feedback19 lines (16 sloc) 450 Bytes.docx
Give feedback19 lines (16 sloc) 450 Bytes.docxGive feedback19 lines (16 sloc) 450 Bytes.docx
Give feedback19 lines (16 sloc) 450 Bytes.docxSUKHI5
 
Give a big-Oh characterization- in terms of n- of the running time of.docx
Give a big-Oh characterization- in terms of n- of the running time of.docxGive a big-Oh characterization- in terms of n- of the running time of.docx
Give a big-Oh characterization- in terms of n- of the running time of.docxSUKHI5
 
Give at least 2 reasons why an entire population of microbes does not.docx
Give at least 2 reasons why an entire population of microbes does not.docxGive at least 2 reasons why an entire population of microbes does not.docx
Give at least 2 reasons why an entire population of microbes does not.docxSUKHI5
 
Giovani Photography bills $650 to Diane Fenning for photography servic.docx
Giovani Photography bills $650 to Diane Fenning for photography servic.docxGiovani Photography bills $650 to Diane Fenning for photography servic.docx
Giovani Photography bills $650 to Diane Fenning for photography servic.docxSUKHI5
 
Germ Theory was a framework that--- All of these argued that disease w.docx
Germ Theory was a framework that--- All of these argued that disease w.docxGerm Theory was a framework that--- All of these argued that disease w.docx
Germ Theory was a framework that--- All of these argued that disease w.docxSUKHI5
 
General Knowledge- In 1927 The Jazz Singer- starring Al Jolson- was hi.docx
General Knowledge- In 1927 The Jazz Singer- starring Al Jolson- was hi.docxGeneral Knowledge- In 1927 The Jazz Singer- starring Al Jolson- was hi.docx
General Knowledge- In 1927 The Jazz Singer- starring Al Jolson- was hi.docxSUKHI5
 
Gereldo recently won a lottery and chose to receive $70-000 todsy inst.docx
Gereldo recently won a lottery and chose to receive $70-000 todsy inst.docxGereldo recently won a lottery and chose to receive $70-000 todsy inst.docx
Gereldo recently won a lottery and chose to receive $70-000 todsy inst.docxSUKHI5
 
genomes are usually circular loops of double-stranded deoxyribonucleic.docx
genomes are usually circular loops of double-stranded deoxyribonucleic.docxgenomes are usually circular loops of double-stranded deoxyribonucleic.docx
genomes are usually circular loops of double-stranded deoxyribonucleic.docxSUKHI5
 
Gastrointestinal Disorders- Teaching about Increasing Fiber Intake- pl.docx
Gastrointestinal Disorders- Teaching about Increasing Fiber Intake- pl.docxGastrointestinal Disorders- Teaching about Increasing Fiber Intake- pl.docx
Gastrointestinal Disorders- Teaching about Increasing Fiber Intake- pl.docxSUKHI5
 
Geert Hofstede surveyed more than 116-000 IBM employees in 40 countrie.docx
Geert Hofstede surveyed more than 116-000 IBM employees in 40 countrie.docxGeert Hofstede surveyed more than 116-000 IBM employees in 40 countrie.docx
Geert Hofstede surveyed more than 116-000 IBM employees in 40 countrie.docxSUKHI5
 
Gale- Mctean- and Lux are partners of Burgers and Brew Company with ca.docx
Gale- Mctean- and Lux are partners of Burgers and Brew Company with ca.docxGale- Mctean- and Lux are partners of Burgers and Brew Company with ca.docx
Gale- Mctean- and Lux are partners of Burgers and Brew Company with ca.docxSUKHI5
 
Future valuesFor the case shown in the following table- calculate the.docx
Future valuesFor the case shown in the following table- calculate the.docxFuture valuesFor the case shown in the following table- calculate the.docx
Future valuesFor the case shown in the following table- calculate the.docxSUKHI5
 
Function Name- isOneCapital Input- 1- (char) A letter 2- (char) A lett.docx
Function Name- isOneCapital Input- 1- (char) A letter 2- (char) A lett.docxFunction Name- isOneCapital Input- 1- (char) A letter 2- (char) A lett.docx
Function Name- isOneCapital Input- 1- (char) A letter 2- (char) A lett.docxSUKHI5
 

More from SUKHI5 (20)

Ghocse the correct answer below- A- No- because the probabafy of burvi.docx
Ghocse the correct answer below- A- No- because the probabafy of burvi.docxGhocse the correct answer below- A- No- because the probabafy of burvi.docx
Ghocse the correct answer below- A- No- because the probabafy of burvi.docx
 
Given Data- MAGLIOCHETTI MOVING CORP- Statement of Earni.docx
Given Data-               MAGLIOCHETTI MOVING CORP- Statement of Earni.docxGiven Data-               MAGLIOCHETTI MOVING CORP- Statement of Earni.docx
Given Data- MAGLIOCHETTI MOVING CORP- Statement of Earni.docx
 
From this table- which mineral level had a significance on which varia.docx
From this table- which mineral level had a significance on which varia.docxFrom this table- which mineral level had a significance on which varia.docx
From this table- which mineral level had a significance on which varia.docx
 
Given a ListItem class- complete main() using the built-in list type t.docx
Given a ListItem class- complete main() using the built-in list type t.docxGiven a ListItem class- complete main() using the built-in list type t.docx
Given a ListItem class- complete main() using the built-in list type t.docx
 
Given a -discrete object- O- the notationO means what- Choose all the.docx
Given a -discrete object- O- the notationO means what- Choose all the.docxGiven a -discrete object- O- the notationO means what- Choose all the.docx
Given a -discrete object- O- the notationO means what- Choose all the.docx
 
Give five examples of unsustainable living or actions from your own ev.docx
Give five examples of unsustainable living or actions from your own ev.docxGive five examples of unsustainable living or actions from your own ev.docx
Give five examples of unsustainable living or actions from your own ev.docx
 
Give an inductive definition of the function rev which takes a list an.docx
Give an inductive definition of the function rev which takes a list an.docxGive an inductive definition of the function rev which takes a list an.docx
Give an inductive definition of the function rev which takes a list an.docx
 
Give feedback19 lines (16 sloc) 450 Bytes.docx
Give feedback19 lines (16 sloc) 450 Bytes.docxGive feedback19 lines (16 sloc) 450 Bytes.docx
Give feedback19 lines (16 sloc) 450 Bytes.docx
 
Give a big-Oh characterization- in terms of n- of the running time of.docx
Give a big-Oh characterization- in terms of n- of the running time of.docxGive a big-Oh characterization- in terms of n- of the running time of.docx
Give a big-Oh characterization- in terms of n- of the running time of.docx
 
Give at least 2 reasons why an entire population of microbes does not.docx
Give at least 2 reasons why an entire population of microbes does not.docxGive at least 2 reasons why an entire population of microbes does not.docx
Give at least 2 reasons why an entire population of microbes does not.docx
 
Giovani Photography bills $650 to Diane Fenning for photography servic.docx
Giovani Photography bills $650 to Diane Fenning for photography servic.docxGiovani Photography bills $650 to Diane Fenning for photography servic.docx
Giovani Photography bills $650 to Diane Fenning for photography servic.docx
 
Germ Theory was a framework that--- All of these argued that disease w.docx
Germ Theory was a framework that--- All of these argued that disease w.docxGerm Theory was a framework that--- All of these argued that disease w.docx
Germ Theory was a framework that--- All of these argued that disease w.docx
 
General Knowledge- In 1927 The Jazz Singer- starring Al Jolson- was hi.docx
General Knowledge- In 1927 The Jazz Singer- starring Al Jolson- was hi.docxGeneral Knowledge- In 1927 The Jazz Singer- starring Al Jolson- was hi.docx
General Knowledge- In 1927 The Jazz Singer- starring Al Jolson- was hi.docx
 
Gereldo recently won a lottery and chose to receive $70-000 todsy inst.docx
Gereldo recently won a lottery and chose to receive $70-000 todsy inst.docxGereldo recently won a lottery and chose to receive $70-000 todsy inst.docx
Gereldo recently won a lottery and chose to receive $70-000 todsy inst.docx
 
genomes are usually circular loops of double-stranded deoxyribonucleic.docx
genomes are usually circular loops of double-stranded deoxyribonucleic.docxgenomes are usually circular loops of double-stranded deoxyribonucleic.docx
genomes are usually circular loops of double-stranded deoxyribonucleic.docx
 
Gastrointestinal Disorders- Teaching about Increasing Fiber Intake- pl.docx
Gastrointestinal Disorders- Teaching about Increasing Fiber Intake- pl.docxGastrointestinal Disorders- Teaching about Increasing Fiber Intake- pl.docx
Gastrointestinal Disorders- Teaching about Increasing Fiber Intake- pl.docx
 
Geert Hofstede surveyed more than 116-000 IBM employees in 40 countrie.docx
Geert Hofstede surveyed more than 116-000 IBM employees in 40 countrie.docxGeert Hofstede surveyed more than 116-000 IBM employees in 40 countrie.docx
Geert Hofstede surveyed more than 116-000 IBM employees in 40 countrie.docx
 
Gale- Mctean- and Lux are partners of Burgers and Brew Company with ca.docx
Gale- Mctean- and Lux are partners of Burgers and Brew Company with ca.docxGale- Mctean- and Lux are partners of Burgers and Brew Company with ca.docx
Gale- Mctean- and Lux are partners of Burgers and Brew Company with ca.docx
 
Future valuesFor the case shown in the following table- calculate the.docx
Future valuesFor the case shown in the following table- calculate the.docxFuture valuesFor the case shown in the following table- calculate the.docx
Future valuesFor the case shown in the following table- calculate the.docx
 
Function Name- isOneCapital Input- 1- (char) A letter 2- (char) A lett.docx
Function Name- isOneCapital Input- 1- (char) A letter 2- (char) A lett.docxFunction Name- isOneCapital Input- 1- (char) A letter 2- (char) A lett.docx
Function Name- isOneCapital Input- 1- (char) A letter 2- (char) A lett.docx
 

Recently uploaded

BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024Janet Corral
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 

Recently uploaded (20)

BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 

Which one is not primitive data type- Boolean- String- double- char.docx

  • 1. Which one is not primitive data type: Boolean, String, double, char List two relational operators and two logical operators Are the following expressions True or False(assume x = 10) (x > 10 || (x-5) !=5) (x - 2) 0 Write loop in Java syntax to repeat reading input if user input x is not between 0 and 25. What will be the value of x and sum after the following code is executed? Int x = 0, sum = 0; while (x 2) angel +=10; else angle +=15; Solution 1) String is a class 2) Relational Operator : equal to operator (=) and greater than equal to (>=) Logical Operator : && (AND) operator, || (OR operator) 3) x=10 a) (x>10 || (x-5)!=5) here first check x>10 i.e. 10>10 which is false then check (x-5)!=5 i.e (10-5)!=5 => 5!=5 which is false now combine the complete equation false || false which is false b) (x-2) <=8 && x>0 (x-2) <=8 i.e. (10-2)<=8 which is 8<=8 which results in true x>0 i.e. 10>0 which is true now combine the complete true && true which is true 4) do { System.out.println("Enter the value of x"); } while(0<x<25); 5) x=0, sum=0
  • 2. while loop will iterate till x<5 i.e x=0,1,2,3,4 and the expression will add the values of x (sum=sum+x) and x++ increases the value by 1 hence 1) x=0 : sum=sum+x i.e. sum = 0+0; sum=0 2) x=1 : sum =sum +x i.e sum = 0+1; sum= 1 3) x=2 : sum =sum +x i.e sum = 1+2; sum= 3 2) x=3 : sum =sum +x i.e sum = 3+3; sum = 6 2) x=4 : sum =sum +x i.e sum = 6+4; sum = 10 At the end value of x will be 5 and sum will be 10 6) for(x=0;x<5;x++) { sum=sum+x; } 7) here int len = str.length() will calculate the length of str which is 18 so System.out.println(len) will print 18. System.out.println(str.charAt(3)); this will check character at index 3 which is l. System.out.println(str.subString(len-4)); this function will fetch substring from str so it will return 1201 O/P 18 l 1201 8) here str = str+"E" , this will append E to the str whcih is starting with H and the loop iterate for count = 0, 1 count = 0 i.e str= str+"E" i.e HE count = 1i.e. str = str = "E" i..e HEE now it exits the loop now str = str+ "LP" hence str becomes HEELP O/P : HEELP 9) user enters the value angle = 5
  • 3. now check conditions one by one if(angle>5) i.e. 5>5 which is false else if (angle>2) angle= angle+10 i.e. 5>2 whcih is true hence angle becomes 5+10 hence after the code execution angle becomes 15