+ 2

What is mean

Return color[(int)(math.Random()star color.Lebgth) ]

17th Apr 2017, 8:32 PM
‏‪ava‬‏
‏‪ava‬‏ - avatar
10 Respuestas
+ 8
there are many syntax errors in this code but i assume from what i am seeing that you have an array of colors and you generate a random index in the array in order to get a random color
17th Apr 2017, 8:34 PM
Burey
Burey - avatar
+ 6
interesting example seems like a logging class for logging different types of messages types, represented by numbers 1,2,3 with hierarchy of INFO (1) being the lowest, DEBUG (2) is the middle and ERROR (3) being the highest level. each time a message is logged, it calls the lower level to also log the same message (as can be seen in the output example) step 1: declaring a base class as abstract (meaning you cannot create instances of it as in "new AbstractLogger" and must extend it with a subclass) the method setNextLogger and logMessage will be shared among all instances of subclasses of this class step 2: decleration of 3 subclasses which extends AbstractLogger nothing much to see in here, just 3 classes which behave practically the same step 3: the class in the file is merely for demostration purposes noteworthy points: getChainOfLoggers() methods return value is errorLogger while the method created and initialized 3 types of loggers o_O the reason behind that is related to the fact this is a chain reaction and errorLogger essentially contains all the loggers within it from there it's merely passing the appropriate flag to the logMessage method (which originally resides in the AbstractLogger class) and from there each individual overriden method is called in the appropriate class (ConsoleLogger, ErrorLogger,FileLogger) fin
21st Apr 2017, 10:42 PM
Burey
Burey - avatar
+ 5
color.length is a propery of an array and will return the number of elements in the array
17th Apr 2017, 9:47 PM
Burey
Burey - avatar
+ 5
sb seems like a class method and b seems like an object of class a if you have more detailed code it would be more helpful
21st Apr 2017, 10:07 AM
Burey
Burey - avatar
0
Thanks i need exactly what mean is this color.length
17th Apr 2017, 9:24 PM
‏‪ava‬‏
‏‪ava‬‏ - avatar
0
Hi again i Have a qoastion If we Have a class for EX a What are b and sb? In this sentences Protected a b; Public void sb(a b) { This.b=b; } i think b is abject from a class and sb is function but i cant understand what they work? What is that sentence mean? Thanks for your help
21st Apr 2017, 9:43 AM
‏‪ava‬‏
‏‪ava‬‏ - avatar
21st Apr 2017, 11:15 AM
‏‪ava‬‏
‏‪ava‬‏ - avatar
0
Can you description to me step 1 and void main
21st Apr 2017, 12:41 PM
‏‪ava‬‏
‏‪ava‬‏ - avatar
0
Baby where are you?
21st Apr 2017, 2:10 PM
‏‪ava‬‏
‏‪ava‬‏ - avatar
0
Ooh thanks you really help me honey ✌️✌️✌️😘😘😘😘😍😍😍😍
22nd Apr 2017, 5:39 AM
‏‪ava‬‏
‏‪ava‬‏ - avatar