To merge two collection col1 and col2 we use merge() method of collection OR We can just pass those collection while declaring the collection Some Example case Sometimes we need to get different collection from same Database Table depending on…
Month: December 2019
Can we Overload the main() method in Java?
One of the common doubts among Java beginners while learning to overload and overriding is, whether it’s possible to overload main() in Java? Can you overload the main() method in Java? How will JVM find if you change the signature…
Setting Preference Activity In Android Q.
PreferenceFragmentCompat
How to add fragment specific menus in Android
You can show new menus from fragment by onCreateOptionsMenu method First you need to setHasOptionsMenu(true) in onCreateView method as second you have to create menus.xml in res/menu/ folder And also you have to set menu in onCreateOptionsMenu method as If you want to replace menus…
getExternalStoragePublicDirectory is deprecated in Android
The contract between the media provider and applications. Contains definitions for the supported URIs and columns. The media provider provides an indexed collection of media types, such as Audio, Video, and Images, from storage devices. Each collection is organized by…