How I can cast a variable in Scala?

Ads
 

How I can cast a variable in Scala?

Hi,

Trying Big Data and now I want to learn to cast variables.

Thanks

View Answers

November 12, 2017 at 7:21 PM

Hi,

Suppose you have an object of Graphics and you wan to cast it to Graphics2D then you can use following code:

g.asInstanceOf[Graphics2D];

Similarly you can apply this logic to all other classes in SCALA.

Thanks

Ads









Related Tutorials/Questions & Answers:
How I can cast a variable in Scala?
How I can cast a variable in Scala?
Advertisements
How can I do it? .click();
How can I learn Java?
how should i can solve
how can i add hibernate plugin to eclipse?
how i can get jqfade.js library
how can i display a pdf file in a jtextarea
how can i remove newline characters and tabs
how can i make monthly register ?
how can i display a editable result of form?
how can i create a discussion forum?
How can i modify my account in roseindia
How can I master Java in one month?
how can i print the selected content of a frame
How can i use Facebook connect button
How can I create sessionfactory in Hibernate?
I don't know how to use counter variable in this Qustion ....:(
How can I show users privileges in MySQL?
How can I change UIButton title color?
How I get a variable from java script to use it in the scriptlet of jsp.
how can i set an object in focus
How can i search and insert within a query
how can i hide and show tables
how can i use ajax and jquery in netbeans ide
how can I great two user and password in C++?
how can I great two user and password in C++?
Can i use Scriptlets inside javascript,if so how?
how can i do group tagging in portlet factory
Please tell me how can i convert string to timer
How can i display the distance of a line drawing randomly?

Ads