How to import scala packages

0 votes
How to import scala packages?
Nov 16, 2020 in Big Data Hadoop by anonymous
• 8,910 points
483 views

1 answer to this question.

0 votes

Scala packages can be imported so that they can be referenced in the current compilation scope. The following statement imports the contents of the scala.xml package −

import scala.xml._

You can import a single class and object, for example, HashMap from the scala.collection.mutable package −

import scala.collection.mutable.HashMap

You can import more than one class or object from a single package, for example, TreeMap and TreeSet from the scala.collection.immutable package −

import scala.collection.immutable.{TreeMap, TreeSet}
answered Nov 16, 2020 by Gitika
• 65,910 points

Related Questions In Big Data Hadoop

0 votes
1 answer

How to groupBy/count then filter on count in Scala

I think the exception is caused because ...READ MORE

answered Apr 19, 2018 in Big Data Hadoop by kurt_cobain
• 9,390 points
28,819 views
0 votes
1 answer

How to import data to HBase from SQL server?

You can easily import the data from ...READ MORE

answered Apr 20, 2018 in Big Data Hadoop by kurt_cobain
• 9,390 points
1,389 views
0 votes
3 answers

Spark Scala: How to list all folders in directory

val spark = SparkSession.builder().appName("Demo").getOrCreate() val path = new ...READ MORE

answered Dec 5, 2018 in Big Data Hadoop by Mark
16,559 views
0 votes
1 answer

How to use sqoop import?

Here is an example of import command. ...READ MORE

answered Dec 14, 2018 in Big Data Hadoop by Omkar
• 69,210 points
611 views
0 votes
1 answer

How to execute scala programming?

We can execute a Scala program in ...READ MORE

answered Nov 16, 2020 in Big Data Hadoop by Gitika
• 65,910 points
596 views
0 votes
1 answer

How to write a Scala program in script mode?

Open notepad and add the following code ...READ MORE

answered Nov 16, 2020 in Big Data Hadoop by Gitika
• 65,910 points
847 views
0 votes
1 answer

How to declare a variable in Scala?

The following is an example program that ...READ MORE

answered Nov 16, 2020 in Big Data Hadoop by Gitika
• 65,910 points
446 views
0 votes
1 answer

How to create an objects using a keyword new?

Example import java.io._ class Point(val xc: Int, val yc: ...READ MORE

answered Nov 17, 2020 in Big Data Hadoop by Gitika
• 65,910 points
385 views
0 votes
1 answer

How to import Flat files in Hadoop using sqoop?

Sqoop is a tool which we use ...READ MORE

answered Apr 9, 2019 in Big Data Hadoop by Gitika
• 65,910 points
1,784 views
0 votes
1 answer

How to start working with scala?

Scala can be installed on any UNIX ...READ MORE

answered Nov 16, 2020 in Big Data Hadoop by Gitika
• 65,910 points
354 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP