I have a Java method that accepts a String
and an String<List>
as method parameters. How do I differentiate the String from not being part of the List?
Method:
void returnValues(String sensor, List<String> attributes)
Call:
nexaConnect.returnValues(Arrays.asList("19455746", "blobJson", "deviceMfg", "eventCode", "sensorClass", "sensorUUID", "timeStamp", "uID"));
The only possible work around I can see is to remove the first String and include the value within the List and then get the first value of the list and use it that way. Is there any way to separate them out so that it's not part of the list?
The attempt to call
returnValues
does not match the formal parameters. Assuming that's what you're asking, then like this.or save the references to local variables and it looks like,