GK Quiz 2 (Dec 2017)
0 of 30 questions completed
You must specify a text.
You must specify an email address.
You must specify a number.
You can Give Self Test for General Knowledge for all competitive Exams or Also Practice for New Questions.
Best of Luck with this Quiz.
Click on the Start Button to Give the Exam of this Quiz.
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading...
You must sign in or sign up to start the quiz.
You have to finish following quiz, to start this quiz:
0 of 30 questions answered correctly
Time has elapsed
You have reached 0 of 0 points, (0)
- Question 1 of 30
ભારતમાં અશોક ચક્ર કયા ક્ષેત્રનું સૌથી ઉચ્ચ એવોર્ડ છે?CorrectIncorrect
- Question 2 of 30
પૃથ્વીના જે વિભાગમાં સૂર્યના સીધા કિરણો પડે છે તે વિભાગની શું કહેવામાં આવે છે?CorrectIncorrect
- Question 3 of 30
નીચેના પૈકી કોને રણજિતરામ સુવર્ણચંદ્રક મળ્યો છે?CorrectIncorrect
- Question 4 of 30
ક્ષેત્રફળની દ્રષ્ટિએ ઓસ્ટ્રેલિયા કયા નંબરે આવતો દેશ છે?CorrectIncorrect
- Question 5 of 30
મનુબેન ગાંધી લિખિત પ્રેરક પ્રસંગ વર્ણન કૃતિ કઈ?CorrectIncorrect
- Question 6 of 30
સાઈની અબ્રાહમનું નામ કઇ રમત સાથે સંકળાયેલું છે?CorrectIncorrect
- Question 7 of 30
ચંદ્રકાંત કે બક્ષીની લેખિત વાર્તા કઈ?CorrectIncorrect
- Question 8 of 30
પૃથ્વીની સપાટી પર આશરે કેટલા ટકા જલાવરણ છે?CorrectIncorrect
- Question 9 of 30
સિદ્ધરાજ જયસિંહના માતાનું નામ શું હતું?CorrectIncorrect
- Question 10 of 30
કવિ શીરોમણી નું માન પામેલા કવિ કોણ?CorrectIncorrect
- Question 11 of 30
ગાંધીજી ને ધોરણ 5 મા કેટલા રૂપિયાની શિષ્યવ્રુત્તિ મળી હતી?CorrectIncorrect
- Question 12 of 30
દક્ષિણ ની ગંગા તરીકે ઓળખાતી નદી કઈ છે?CorrectIncorrect
- Question 13 of 30
ફ્રાન્સમાં આવેલી સૌથી મોટી નદી કઈ છે?CorrectIncorrect
- Question 14 of 30
પ્રથમ વિશ્વયુદ્ધનો પ્રારંભ ક્યારે થયો હતો?CorrectIncorrect
- Question 15 of 30
ગુજરાતમાં મગફળીનું સૌથી વધુ ઉત્પાદન ક્યાં થાય છે?CorrectIncorrect
- Question 16 of 30
મૈસુરના વાઘ તરીકે કોણ જાણીતું હતું?CorrectIncorrect
- Question 17 of 30
સૌથી ઓછી વસતી ધરાવતું રાજ્ય કયુ?CorrectIncorrect
- Question 18 of 30
આમાં ધાતુમય ખનીજ કયુ છે?CorrectIncorrect
- Question 19 of 30
આમાં કયુ ધાતુમય ખનીજ નથી?CorrectIncorrect
- Question 20 of 30
વિટામિન-ઈ ની ઊણપથી કયો રોગ થાય છે?CorrectIncorrect
- Question 21 of 30
કોશા એ દાદા કેસરી સિંઘની શું હતી?CorrectIncorrect
- Question 22 of 30
નીચેનામાંથી કયું નામ ભવાઈ સાથે સંકળાયેલું છે?CorrectIncorrect
- Question 23 of 30
ડોલોમાઇટ અને લિગ્નાઇટ કોલસો ત્યાંથી મળી આવે છે?CorrectIncorrect
- Question 24 of 30
હાલનું અજમેર પ્રાચીનકાળમાં કયા નામે ઓળખાતું હતું?CorrectIncorrect
- Question 25 of 30
રાષ્ટ્રપતિ દ્વારા એપ્રિલ ૨૦૧૬ કયા મહિલા ખેલાડી ની રાજ્યસભા માં નિમણૂક કરવામાં આવી છે?CorrectIncorrect
- Question 26 of 30
ઋગ્વેદમાં કેટલી ઋચાઓનો સંગ્રહ છે?CorrectIncorrect
- Question 27 of 30
દેશમાં નાણાંકીય નીતિ કોણ ઘડે છે?CorrectIncorrect
- Question 28 of 30
વિદ્યુત પ્રવાહની હાજરી નોંધાવવા માટે કયુ યંત્ર વપરાશે?CorrectIncorrect
- Question 29 of 30
વસ્તી અને વિસ્તારની દૃષ્ટિએ ગુજરાતનો સૌથી નાનો જિલ્લો કયો?CorrectIncorrect
- Question 30 of 30
કવિ ઉમાશંકર જોશીને કયા વર્ષમાં જ્ઞાનપીઠ પુરસ્કાર મળ્યો હતો?CorrectIncorrect
Leaderboard: GK Quiz 2 (Dec 2017)
|Table is loading|
|No data available|
A chance to Win 100/- Rs.
If User Can Solve this Quiz and Get Number 1 then They Get 100/- Rs.
Follow this Condition.
- 1st User Get 100/- Rs.
- 2nd User Get 50/- Rs.
- 3rd User Get 30/- Rs.
Quiz Execute on Once in the Single Device.
See More Information About Java Programming Class.
What’s a Class?
OK, now that you have mastered the “Edit, Compile, Execute” cycle, it’s time to find out what all the stuff is that we surround our simple message “Hello World!” with, to get it displayed.
When we started working with Logo in TG, all we had to do was enter commands and things happened. But with Java, we had to create a class with the main procedure (called a method in Java). What’s with this???
In this lesson, you will learn
- what a
classis and its syntax,
- what Java’s keywords are,
- what a method is, and its syntax,
- about a special method:
public static void main(String args)
IF JAVA PROGRAMS ARE BUILT FROM THINGS CALLED CLASSES,
WHAT IS A CLASS?
A class is a specification (think of it as a blueprint or pattern and a set of instructions) of how to provide some service. Like a blueprint or a pattern, a Java class has exact specifications. The specification is the class’ contract. I’ve talked about contracts before. First, back when I introduced Adding Commands in Logo and again when we learned about Defining Operators when we specified a contract for a Grid Toolkit.
Engineers and construction and factory workers use blueprints to build cars, buildings, bridges, virtually anything. Tailors, seamsters, printers use patterns to make the clothes we wear, books we read. Chefs follow recipes to put together meals.
Start by thinking of a class as an object. Imagine a class as a container, like that glass or plastic bottle you drink your favorite beverage from. Even something this simple has specifications – it has a size. It can only hold so much. A beverage company puts something in it. You take it out. It’s used for storing something. More commonly, classes can store things and do things. Think about a modern digital camera as an object. You take pictures with it – it captures images and stores them. They also let you do things with the stored images, like cropping and stitching. Both of these objects, a bottle, and a camera can be represented as classes.
You construct a class by writing what looks a lot like an outline. There are rules that you must follow to write this outline in the Java language, many of them and they are unambiguous. In computer programming, these rules are called the language’s syntax.
The logo had its own syntax. Its syntax is pretty simple, which is one reason I chose to expose you to it before Java. Java has a much more complex syntax. The rest of this lesson will cover the rules for writing a syntactically correct Java class.
A CLASS CONSISTS OF…
Here is a breakdown of the source code representation of a Java class. A class can be broken down into two things:
- The first piece is a class-header which consists of the keyword “
class"and the name you give to the class. Names in programming languages are also known as identifiers.
- The second piece is the body. It consists of a pair of open/close squiggly brackets with stuff in between them.
Here is a template for the source code of a class:
Figure 21.1When you write a class, you replace <identifier> with the name you want to give your class. The body of your class is made up of one or more<member>s (the line with “…” on it means any number of the preceding things). You can use this example every time you write the source code for a class.
Specifically, the keyword “
class" should start in the first column of a line followed by the rest of the header information – an identifier in the simplest case.
The open-squiggly-bracket delimits the header and initiates the class’ body. Some programmers like to place it at the end of the header line; I like to place it on its own line, all by itself.
A close-squiggly-bracket delimits the class’ body. A common practice is to place a close-squiggly-bracket in column 1 by itself.
The contents of the body of a class consists of a collection of <member>s. Members consist of variables called fields and things it does, calledmethods (also known as procedures).
The contents of the body (its <member>s) should be indented at least two columns. Many programmers indent four columns at a time to make the source code easier to read. The number of columns you indent is not important, but you need to be consistent with whatever amount you choose. See indentation conventions in the jargon appendix for a longer explanation of why).
There is another convention that you need to be aware of: class identifiers should start with a capital letter and every new word in it should also be capitalized.
Compare the class template above with the Hello World program in the last lesson. It has a single <member>, a method declaration. This method (main) is needed in every application. It is special, so we’ll dedicate an upcoming section to it. But, first I want to cover Java’s vocabulary, its keywords.
Java keywords are words reserved as core building blocks of the Java language. You may not use them for names of things you create, like class, field and method identifiers. The Java compiler recognizes these words and treats them special. Table 21.1 contains all of Java’s keywords. The special meaning of these keywords will be covered as each is introduced in a lesson.
THE SPECIAL METHOD:
PUBLIC STATIC VOID MAIN(STRING[ ] ARGS)
When we execute a Java application, we use the “java” command which runs the Java Virtual Machine (JVM) and we specify a class file for it to execute. But, how does the JVM know where to start executing?
ANSWER: It starts with a special method you identify as the “main” method of your application. This convention is a tradition Java inherited from the “C” programming language.
The source code for main( ) always looks something like:
Figure 21.2I’m going to pass on the full explanation behind why we need “public static” in your declaration of “main” but, trust me, those keywords need to be there. For now, think of the keywords: public and static as special modifiers needed for the method main to be found and accessible.
The identifier can be anything, but it’s pretty much a standard that you use the name “args” (which is an abbreviation of arguments) because this is what has been used everywhere.
Java programs are composed of classes. Classes are composed of <member>s. Members are either fields and methods. Every program needs to have a special method named main. If you merge the source code I’ve given you above, you end up with a template for a minimal Java application. Figure 21.3 shows the template.
Figure 21.3with the first identifier is the class’ name and the second identifier is args.
NOTE Remember – it is a defacto standard that all class names start with a capital letter, with additional words in it also capitalized. As an example, MyClass is proper but myClass and Myclass are not.
NOTE Remember – your class identifier must also be the name of the file you enter your source code into. The file also must have the extension of “.java”