title: I am modifying Java with Kotlin, but I am struggling to fix the wrong parts(edit )
body: <p>I would appreciate it if you could help me.</p>
  
  <p><strong>activity.kotlin</strong></p>
  
  <pre><code>var postsMap = HashMap&lt;&gt;() //Here error
  postsMap.put("uid", current_user_id)
  postsMap.put("date", saveCurrentDate)
  postsMap.put("time", saveCurrentTime)
  postsMap.put("description", Description)
  postsMap.put("postimage", downloadUrl)
  postsMap.put("profileimage", userProfileImage)
  postsMap.put("fullname", userFullName)
  PostsRef.child(current_user_id + postRandomName).updateChildren(postsMap)//Here error
      .addOnCompleteListener(object : OnCompleteListener {//Here error
          override fun onComplete(task: Task&lt;*&gt;) { //Here error
              if (task.isSuccessful) {
                  SendUserToMainActivity()
                  Toast.makeText(
                      this@PostActivity,
                      "New Post is updated successfully.",
                      Toast.LENGTH_SHORT
                  ).show()
  
              } else {
                  Toast.makeText(
                      this@PostActivity,
                      "Error Occured while updating your post.",
                      Toast.LENGTH_SHORT
                  ).show()
  
              }
          }
      })
  </code></pre>
  
  <p>sorry for the inaccurate question.
  Thank you</p>
  
  <p>I corrected the code through answer. Thank you.</p>
  
  <p>val postsMap: HashMap = hashMapOf()</p>
  
  <p>PostsRef!!.child(current_user_id + postRandomName).updateChildren(postsMap)</p>