Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Meaning of the Dollar symbol ($) in the log messages

    java.util.ConcurrentModificationException: null
    java.util.HashMap$HashIterator(HashMap.java:806)

    com.cimba.gsr.fragments.SessionsFragment(SessionsFragment.java:233)

    com.cimba.gsr.fragments.SessionsFragment$4(SessionsFragment.java:201)

Sometime in log output after a class name there is a Dollor symbol ($) in the message what does that mean? I thought it's the method name or the variable name in the class that caused the exception but in this case it doesn't make sense (SessionsFragment$4 it can't be the name of a method or variable). so what is it ?

like image 976
M'hamed Avatar asked Sep 18 '14 18:09

M'hamed


People also ask

Why does the dollar sign ($) go before the amount?

In many contexts, a figure like $12.34 isn't a quantity ("twelve point three four dollars") but rather a count ("one thousand, two hundred and thirty-four pennies"). Prefixing it with a dollar sign makes it clear that its meaning differs from other decimal-format numbers.

Does the dollar sign ($) go before or after the number?

The dollar sign is placed to the right of the dollar figure. Use a non-breaking space after the dollar figure, and between the dollar sign and the country code: 25,99 $ US.

What is the meaning of dollar symbol?

The dollar sign, also known as peso sign, is a symbol consisting of a capital "S" crossed with one or two vertical strokes ($ or. ), used to indicate the unit of various currencies around the world, including most currencies denominated "peso" and "dollar". The explicitly double-barred.

What does '$' do in JavaScript?

$ – dollar identifier The dollar ($) sign is a JavaScript identifier, which simply means that it identifies an object in the same way that a name or variable does. Variables, functions, properties, events, and objects can be identified by the $ sign.


1 Answers

The $ is a separator that indicates that there is a nested class HashIterator inside the HashMap class, and that there is an anonymous inner class (the fourth one, it looks like) inside the SessionsFragment class.

This site explains the $ separator.

Filename: StackTrace.java

Line number: 267
Package name: boo.hoo
Full class name: boo.hoo.StackTrace$FirstNested$SecondNested
Simple class name: StackTrace$FirstNested$SecondNested
Unmunged class name: StackTrace.FirstNested.SecondNested
Direct class name: SecondNested
Method name: <init>
Native method?: false
toString():
boo.hoo.StackTrace$FirstNested$SecondNested.<init>(StackTrace.java:267)

The nested classes are distinguished from the higher-level nested classes and from the top-level class by using the dollar sign character ($). So, technically, the "simple" name of the second nested class is StackTrace$FirstNested$SecondNested.

like image 182
rgettman Avatar answered Sep 26 '22 02:09

rgettman