• Post Reply Bookmark Topic Watch Topic
  • New Topic

Question about DisplayMode  RSS feed

 
Alex Vestin
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I've started reading 'Fundamental 2D Game Programming with Java' and came across this code snippet;



What I don't quite understand is what is happening at this line


 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16028
87
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you explain in more detail what you don't understand about that line?

other is a DisplayModeWrapper object. It has a member variable named dm (which is probably of type DisplayMode) and class DisplayMode has a method getWidth() which is being called on the object that other.dm refers to.

It's exactly the same as System.out.println(...) - class System has a member variable named out (which is an OutputStream) on which the method println is called.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!