error error only classes can have declared but undefined members

0 votes

I am working on Scala but but got an error while initializing variable:

This is the way I initialized:

Can someone tell why this error and how to solve?

Jul 24, 2019 in Apache Spark by Nitesh

recategorized Jul 24, 2019 by Gitika 2,298 views

1 answer to this question.

0 votes
Hi,

This happens in Scala whenever you won't initialize any value to the variable, you need to initialize a value whenever using any REPL in Scala.
answered Jul 24, 2019 by Gitika
• 65,770 points

Related Questions In Apache Spark

0 votes
1 answer
0 votes
0 answers

Do we have any platform where we can submit spark application.

looking for a platform where we can ...READ MORE

May 12, 2020 in Apache Spark by anonymous
• 120 points
855 views
0 votes
2 answers

How to execute a function in apache-scala?

Function Definition : def test():Unit{ var a=10 var b=20 var c=a+b } calling ...READ MORE

answered Aug 5, 2020 in Apache Spark by Ramkumar Ramasamy
1,029 views
0 votes
1 answer

How to get the number of elements in partition?

rdd.mapPartitions(iter => Array(iter.size).iterator, true) This command will ...READ MORE

answered May 8, 2018 in Apache Spark by kurt_cobain
• 9,350 points
2,211 views
0 votes
2 answers

How do I find all files containing specific text on Linux?

grep -rnw 'text to find recursively inside ...READ MORE

answered May 20, 2019 in Linux Administration by Ritesh Singh
40,400 views
0 votes
4 answers

Must read books on programming

Books for different technologies - R - ...READ MORE

answered Jul 18, 2019 in Career Counselling by anonymous
• 33,030 points
1,519 views
0 votes
1 answer

error: identifier expected but ']' found.

Hi, You can try this remove brackets from ...READ MORE

answered Jul 3, 2019 in Apache Spark by Gitika
• 65,770 points
5,532 views
0 votes
1 answer

error: identified expected but integer literal found.

Hi, You can resolve this error with a ...READ MORE

answered Jul 4, 2019 in Apache Spark by Gitika
• 65,770 points
6,142 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