OCJP Certification- Exception Handling Questions
1. What exception will be occurred with below code? int a = 100; int b = getSumOfProducts(); // This method returns 0 values int c = a/b; NullPointerException ArithmeticException IOException…
Java Coding Testing Questions and Answers
When a class implements to Comparable interface, what method must also be implemented? compareTo toString compare equals Answer: 1 – CompareTo Which of the following declaration is correct that MAX…
Java Freshers Written Test Questions
1. You have a Employee class with a public String field departmentName. In you program’s main method,you create a Employee instance e1. What is output of the below code ?…
OCJP Certification Dumps
1: Employee[] department = new Employee[10];What exception occurs when you try adding an eleventh employee to the department? IOException NullPointerException ArithmeticException ArrayIndexOutOfBoundsException Answer: 4 – ArrayIndexOutOfBoundsException 2: How would you…
Flutter Custom Fonts
In this tutorial, we will see how to use custom fonts in flutter Step1: Download fonts from google In this, I have downloaded fonts from https://fonts.google.com/specimen/Roboto Step2: create folder assets/fonts…
How to set Device Orientation on Demand
Some times, you might need to set device orientation for specific pages and need to load in landscape mode only for reports or charts screen. On screen loading, In initState…
Screen Orientation In Flutter
In this tutorial, we will see all possible options to set the device orientation in Flutter How to set the device Orientation in Flutter First you need to import the…
Flutter – Disable Landscape Mode
In this post, we will see how to disable landscape mode in flutter or lock the device orientation. SystemChrome.setPreferredOrientations method sets the device orientation in flutter and to access this,…