Android
Marketing
Big Data
Hiring Tips
Entrepreneurship
IN BASICS - VENTURESITY
by Sidharth Das - no
comments
SEARCH
Weekly Challenge
Like 8,375people
likethis.Sign
Uptosee
whatyour
friendslike.
1
Recommend
onGoogle
EnteryourEmailAddress...
Subscribe
VenturehackorganizedbyVenturehireinvited
allGeeks,designers,analystsallengineering
profilestotesttheirskills.Therewasaseriesof
writtenandcodingtesttojudgetheskillsof
individuals.Wewillshareaseriesof
questionnaireseveryweektomakeyouprepare
forthefutureinterviews.Withthisseriesyouwill
geteverydetailedanswerstomakeyou
understandtheconceptratherthanmuggingup
answers.
1..Supposeaclasshaspublicvisibility.Inthis
classwedefineaprotectedmethod.Whichof
thefollowingstatementsiscorrect?
Thismethodisonlyaccessiblefrom
insidetheclassitselfandfrominsideall
subclasses.
Inaclass,youcannotdeclaremethods
withalowervisibilitythanthevisibilityof
theclassinwhichitisdefined.
Fromwithinprotectedmethodsyoudonot
haveaccesstopublicmethods.
Thismethodisaccessiblefromwithinthe
classitselfandfromwithinallclasses
definedinthesamepackageastheclass
itself.(correct)
Description:Theprotectedmodifierspecifiesthat
themembercanonlybeaccessedwithinitsown
http://www.venturesity.com/blog/venturehack-questionnaire-java-set-a
RSSFeed
ZivameHackathon
Rewind
VentureHackIII
Successdiaries
VenturesityWeekly
ChallengeI
Venturehack,EventI
SuccessDiaries
Fiveclassestobuild
anAndroidApplication
1/6
12/30/2014
packageand,inaddition,byasubclassofitsclass
inanotherpackage.
GrowthHackingisthe
newruleofmarketing
ClassAccessibilitychart:
Modifier
inageofcontext
Tags
public
Y
Advantages of Hadoop
protected
analytics
no
modifier
android
App Development
Android Application
private
android
development android
hackathon Android in
2.Giventheseclasses:
publicclassPerson{
publicvoidtalk(){
System.out.print(IamaPerson)
}
publicclassStudentextendsPerson{
publicvoidtalk(){
System.out.print(IamaStudent)
}
whatistheresultofthispieceofcode:
publicclassTest{
publicstaticvoidmain(Stringargs[]){
Personp=newStudent()
p.talk()
}
IamaPerson
IamaStudent(correct)
IamaPersonIamaStudent
IamaStudentIamaPerson
Description:Whentypeoftheobjectis
determinedatruntime,itisknownasdynamic
binding.
3.Whichthreeformpartofcorrectarray
declarations?1.publicinta[]2.staticint[]a
3.public[]inta4.privateinta[3]5.privateint
http://www.venturesity.com/blog/venturehack-questionnaire-java-set-a
Big Data
Big Data
Analytics career
Training
hackathon
online
marketing ppc
predictive analytics
predictive model
python R
2/6
12/30/2014
[3]a[]6.publicfinalint[]a
1.
2.
3.
4.
1,3,4
2,4,5
1,2,6(correct)
2,5,6
Hadoop
ads
Syntax:ArrayDataTypeArrayName[]
4.Whatallowstheprogrammertodestroyan
objectxinJava?
x.delete().
x.finalize()
Runtime.getRuntime().gc()
Onlythegarbagecollectionsystemcan
destroyanobject(correct)
Automaticgarbagecollectionistheprocessof
lookingatheapmemory,identifyingwhichobjects
areinuseandwhicharenot,anddeletingthe
unusedobjects.
5.Whichofthegivenbelowstatementsis
incorrectregardingastaticnestedclass?
Itdoesnothaveaccesstononstatic
membersoftheenclosingclass.
Onemustnothaveareferencetoan
instanceoftheenclosingclassinorderto
instantiateit.(correct)
Itsvariablesandmethodsmustbestatic.
bothbandc
Description:Astaticnestedclasscannotrefer
directlytoinstancevariablesormethodsdefinedin
itsenclosingclass:itcanusethemonlythroughan
objectreference.
6.Whatisthedefaultprioritynumberofthethread
inbelowprogram?
classexample{
publicstaticvoidmain(Stringargs[]){
Threadt=Thread.currentThread()
System.out.println(t)
}}
0
4
5(correct)
noneofthese
http://www.venturesity.com/blog/venturehack-questionnaire-java-set-a
3/6
12/30/2014
Description:AllJavathreadshaveapriorityinthe
range110.Prioritybydefaultis5.
7.Howcanyouserializeanobject?
Youhavetomaketheclassoftheobject
implementtheinterfaceSerializable.
(correct)
Youmustcallthemethod
serializeObject()(whichisinheritedfrom
classObject)ontheobject.
Youshouldcallthestaticmethod
serialize(Objectobj)fromclassSerializer,
withasargumenttheobjecttobe
serialized.
Readthedocumentationhere.
8.Whatarethedifferenttypesofstatementsin
JDBC?
statementusingSQL
NonCallablestatements
preparedstatement
bothaandc(correct)
Description
1. Statementwhichisusedtorunsimplesql
statementslikeselectandupdate
2. PrepareStatmentisusedtorunPre
compiledsql.
3. CallableStatementisusedtoexecutethe
storedprocedures.
19.Whichclasscanneverbeasubclassin
java?
abstractclass
parentclass
Finalclass(correct)
noneofthese
Description:Afinalclassneverbesubclassed.
10.Whatisbeanmanagedpersistence?
Whenyouimplemententityorsession
beanmethodstouseSQLcommandsyou
provide.(correct)
Whenthebeanscontainerhandlesdata
storageandretrieval.
WhentheJ2EEserverisnevershutdown.
Whenchangestodatabasedataarelost
duringacrash.
http://www.venturesity.com/blog/venturehack-questionnaire-java-set-a
4/6
12/30/2014
ReadmoreaboutBeanPersistence.
RelatedPosts
InterviewQuestionandAnswerfor
AndroidJobs
Top10programminglanguagestolearn
Now
ProgramfortheHadoopplatformwithout
usingjava
Doespolygotprogramminghavethe
potentialtoruntheworld?
Leave a Comment
Name
(required)
Email
(required)
URL
Submit
Notify me of follow-up comments by email.
Notify me of new posts by email.
http://www.venturesity.com/blog/venturehack-questionnaire-java-set-a
5/6
12/30/2014
Courses
Call us
Email us
+91-
help@venturesity.comBigDataTrack
9590091584
PoweredbyWordPress,
designedbyCodeinWP.
Jobs
Internship
MobilityTrack
FullTime
MarketingTrack
HiringPartners
ProductDesignTrack
UI/UXTrack
http://www.venturesity.com/blog/venturehack-questionnaire-java-set-a
6/6