1)For drawing and positioning with GUI, the coordinates (0,0) refer to: a)The ce
ID: 3754366 • Letter: 1
Question
1)For drawing and positioning with GUI, the coordinates (0,0) refer to:
a)The center of the GUI box
b)The bottom left corner of the GUI box
c)The top left corner of the GUI box
d)The bottom right corner of the GUI box
2)Strings are immutable which means once they are made, they can't be changed.
3) Strings are a sequence of characters.
4)Pressing a GUI button normally causes an event to occur.
5)The STRING class has many methods. Which of the following are methods of the STRING class?
a)A method/property that returns the length of the string
b)A method that will change lower case letters to upper case
c)A method that will return the index of a character in string or return -1 if not found
d)The + operator is use for concatenation of strings
e)All the above
a)The center of the GUI box
b)The bottom left corner of the GUI box
c)The top left corner of the GUI box
d)The bottom right corner of the GUI box
Explanation / Answer
1. c)The top left corner of the GUI box
The top left corner of a box has coordinates (0,0)
2. a)True
Yes they are immutable. If changes are needed, using an other string helps.
3. b)False
String need not have a sequence of characters. It can contain random characters of different length.
4. a)True
Yes, there are many events which are triggered based on the user's action like on button click, on reload, on hover etc.
5. e)All the above
a)A method/property that returns the length of the string - length
b)A method that will change lower case letters to upper case - toUpperCase()
c)A method that will return the index of a character in string or return -1 if not found - indexOf()
d)The + operator is use for concatenation of strings - string1 + string2
Please check the answers. If you have any doubts comment below and i am happy to help :)
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.